changeset 34743:dc2bf7074147

hgweb: more "headers are native strs" cleanup I'll fix the decodevaluefromheaders function in an upcoming change. Differential Revision: https://phab.mercurial-scm.org/D1111
author Augie Fackler <augie@google.com>
date Sun, 15 Oct 2017 00:42:25 -0400
parents 5a9cad0dfddb
children 0a2ef612ad50
files mercurial/hgweb/protocol.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py	Sun Oct 15 00:41:34 2017 -0400
+++ b/mercurial/hgweb/protocol.py	Sun Oct 15 00:42:25 2017 -0400
@@ -69,13 +69,13 @@
         if pycompat.ispy3:
             args = {k.encode('ascii'): [v.encode('ascii') for v in vs]
                     for k, vs in args.items()}
-        postlen = int(self.req.env.get('HTTP_X_HGARGS_POST', 0))
+        postlen = int(self.req.env.get(r'HTTP_X_HGARGS_POST', 0))
         if postlen:
             args.update(cgi.parse_qs(
                 self.req.read(postlen), keep_blank_values=True))
             return args
 
-        argvalue = decodevaluefromheaders(self.req, 'X-HgArg')
+        argvalue = decodevaluefromheaders(self.req, r'X-HgArg')
         args.update(cgi.parse_qs(argvalue, keep_blank_values=True))
         return args
     def getfile(self, fp):
@@ -115,7 +115,7 @@
 
         # Determine the response media type and compression engine based
         # on the request parameters.
-        protocaps = decodevaluefromheaders(self.req, 'X-HgProto').split(' ')
+        protocaps = decodevaluefromheaders(self.req, r'X-HgProto').split(' ')
 
         if '0.2' in protocaps:
             # Default as defined by wire protocol spec.