##// END OF EJS Templates
hgweb: more "headers are native strs" cleanup...
Augie Fackler -
r34744:dc2bf707 default
parent child Browse files
Show More
@@ -69,13 +69,13 b' class webproto(wireproto.abstractserverp'
69 if pycompat.ispy3:
69 if pycompat.ispy3:
70 args = {k.encode('ascii'): [v.encode('ascii') for v in vs]
70 args = {k.encode('ascii'): [v.encode('ascii') for v in vs]
71 for k, vs in args.items()}
71 for k, vs in args.items()}
72 postlen = int(self.req.env.get('HTTP_X_HGARGS_POST', 0))
72 postlen = int(self.req.env.get(r'HTTP_X_HGARGS_POST', 0))
73 if postlen:
73 if postlen:
74 args.update(cgi.parse_qs(
74 args.update(cgi.parse_qs(
75 self.req.read(postlen), keep_blank_values=True))
75 self.req.read(postlen), keep_blank_values=True))
76 return args
76 return args
77
77
78 argvalue = decodevaluefromheaders(self.req, 'X-HgArg')
78 argvalue = decodevaluefromheaders(self.req, r'X-HgArg')
79 args.update(cgi.parse_qs(argvalue, keep_blank_values=True))
79 args.update(cgi.parse_qs(argvalue, keep_blank_values=True))
80 return args
80 return args
81 def getfile(self, fp):
81 def getfile(self, fp):
@@ -115,7 +115,7 b' class webproto(wireproto.abstractserverp'
115
115
116 # Determine the response media type and compression engine based
116 # Determine the response media type and compression engine based
117 # on the request parameters.
117 # on the request parameters.
118 protocaps = decodevaluefromheaders(self.req, 'X-HgProto').split(' ')
118 protocaps = decodevaluefromheaders(self.req, r'X-HgProto').split(' ')
119
119
120 if '0.2' in protocaps:
120 if '0.2' in protocaps:
121 # Default as defined by wire protocol spec.
121 # Default as defined by wire protocol spec.
General Comments 0
You need to be logged in to leave comments. Login now