Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/server.py @ 38308:9f499d28efb4
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 12 Jun 2018 20:42:42 -0400 |
parents | ed5448edcbfa |
children | af0e88e64ede |
comparison
equal
deleted
inserted
replaced
38307:42f3a277c8dc | 38308:9f499d28efb4 |
---|---|
123 path, query = _splitURI(self.path) | 123 path, query = _splitURI(self.path) |
124 | 124 |
125 # Ensure the slicing of path below is valid | 125 # Ensure the slicing of path below is valid |
126 if (path != self.server.prefix | 126 if (path != self.server.prefix |
127 and not path.startswith(self.server.prefix + b'/')): | 127 and not path.startswith(self.server.prefix + b'/')): |
128 self._start_response(common.statusmessage(404), []) | 128 self._start_response(pycompat.strurl(common.statusmessage(404)), |
129 self._write("Not Found") | 129 []) |
130 self._write(b"Not Found") | |
130 self._done() | 131 self._done() |
131 return | 132 return |
132 | 133 |
133 env = {} | 134 env = {} |
134 env[r'GATEWAY_INTERFACE'] = r'CGI/1.1' | 135 env[r'GATEWAY_INTERFACE'] = r'CGI/1.1' |