Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/protocol.py @ 34740:b2601c5977a4
hgweb: more "http headers are native strs" cleanup
Differential Revision: https://phab.mercurial-scm.org/D1108
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 15 Oct 2017 00:38:33 -0400 |
parents | c23fa3103925 |
children | 5a9cad0dfddb |
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py Sun Oct 15 00:05:43 2017 -0400 +++ b/mercurial/hgweb/protocol.py Sun Oct 15 00:38:33 2017 -0400 @@ -75,10 +75,10 @@ args.update(cgi.parse_qs(argvalue, keep_blank_values=True)) return args def getfile(self, fp): - length = int(self.req.env['CONTENT_LENGTH']) + length = int(self.req.env[r'CONTENT_LENGTH']) # If httppostargs is used, we need to read Content-Length # minus the amount that was consumed by args. - length -= int(self.req.env.get('HTTP_X_HGARGS_POST', 0)) + length -= int(self.req.env.get(r'HTTP_X_HGARGS_POST', 0)) for s in util.filechunkiter(self.req, limit=length): fp.write(s) def redirect(self):