Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/server.py @ 41130:074c72a38423
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 07 Jan 2019 19:03:23 -0500 |
parents | 348352658e4b 197f092b2cd9 |
children | 4045ab21945a |
comparison
equal
deleted
inserted
replaced
41129:d8f5c615e811 | 41130:074c72a38423 |
---|---|
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(pycompat.strurl(common.statusmessage(404)), | 128 self._start_response(pycompat.strurl(common.statusmessage(404)), |
129 []) | 129 []) |
130 if self.command == 'POST': | |
131 # Paranoia: tell the client we're going to close the | |
132 # socket so they don't try and reuse a socket that | |
133 # might have a POST body waiting to confuse us. We do | |
134 # this by directly munging self.saved_headers because | |
135 # self._start_response ignores Connection headers. | |
136 self.saved_headers = [(r'Connection', r'Close')] | |
130 self._write(b"Not Found") | 137 self._write(b"Not Found") |
131 self._done() | 138 self._done() |
132 return | 139 return |
133 | 140 |
134 env = {} | 141 env = {} |