Patchwork D1111: hgweb: more "headers are native strs" cleanup

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2017, 3:10 p.m.
Message ID <80b76dd7764a21dd67974efaa3ddd686@localhost.localdomain>
Download mbox | patch
Permalink /patch/24996/
State Not Applicable
Headers show

Comments

phabricator - Oct. 16, 2017, 3:10 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdc2bf7074147: hgweb: more &quot;headers are native strs&quot; cleanup (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1111?vs=2813&id=2819

REVISION DETAIL
  https://phab.mercurial-scm.org/D1111

AFFECTED FILES
  mercurial/hgweb/protocol.py

CHANGE DETAILS




To: durin42, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py
+++ b/mercurial/hgweb/protocol.py
@@ -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.