# HG changeset patch # User Augie Fackler # Date 2018-06-13 00:42:42 # Node ID 9f499d28efb41fe3399914f07d30a54c3313eda3 # Parent 42f3a277c8dcaa49122aaa521ef0ce5c719bc7cb hgweb: pass a sysstr to low-level _start_response method This fixes a regression in Python 3 support introduced in 7de7bd407251 on the stable branch. We're so early in do_hgweb that I don't see any especially better choices than this. Differential Revision: https://phab.mercurial-scm.org/D3726 diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -125,8 +125,9 @@ class _httprequesthandler(httpservermod. # Ensure the slicing of path below is valid if (path != self.server.prefix and not path.startswith(self.server.prefix + b'/')): - self._start_response(common.statusmessage(404), []) - self._write("Not Found") + self._start_response(pycompat.strurl(common.statusmessage(404)), + []) + self._write(b"Not Found") self._done() return