Show More
@@ -109,6 +109,7 b' class webproto(abstractserverproto):' | |||||
109 | else: |
|
109 | else: | |
110 | data[k] = knownargs[k][0] |
|
110 | data[k] = knownargs[k][0] | |
111 | return [data[k] for k in keys] |
|
111 | return [data[k] for k in keys] | |
|
112 | ||||
112 | def _args(self): |
|
113 | def _args(self): | |
113 | args = self.req.form.copy() |
|
114 | args = self.req.form.copy() | |
114 | if pycompat.ispy3: |
|
115 | if pycompat.ispy3: | |
@@ -123,6 +124,7 b' class webproto(abstractserverproto):' | |||||
123 | argvalue = decodevaluefromheaders(self.req, r'X-HgArg') |
|
124 | argvalue = decodevaluefromheaders(self.req, r'X-HgArg') | |
124 | args.update(cgi.parse_qs(argvalue, keep_blank_values=True)) |
|
125 | args.update(cgi.parse_qs(argvalue, keep_blank_values=True)) | |
125 | return args |
|
126 | return args | |
|
127 | ||||
126 | def getfile(self, fp): |
|
128 | def getfile(self, fp): | |
127 | length = int(self.req.env[r'CONTENT_LENGTH']) |
|
129 | length = int(self.req.env[r'CONTENT_LENGTH']) | |
128 | # If httppostargs is used, we need to read Content-Length |
|
130 | # If httppostargs is used, we need to read Content-Length | |
@@ -130,9 +132,11 b' class webproto(abstractserverproto):' | |||||
130 | length -= int(self.req.env.get(r'HTTP_X_HGARGS_POST', 0)) |
|
132 | length -= int(self.req.env.get(r'HTTP_X_HGARGS_POST', 0)) | |
131 | for s in util.filechunkiter(self.req, limit=length): |
|
133 | for s in util.filechunkiter(self.req, limit=length): | |
132 | fp.write(s) |
|
134 | fp.write(s) | |
|
135 | ||||
133 | def redirect(self): |
|
136 | def redirect(self): | |
134 | self.oldio = self.ui.fout, self.ui.ferr |
|
137 | self.oldio = self.ui.fout, self.ui.ferr | |
135 | self.ui.ferr = self.ui.fout = stringio() |
|
138 | self.ui.ferr = self.ui.fout = stringio() | |
|
139 | ||||
136 | def restore(self): |
|
140 | def restore(self): | |
137 | val = self.ui.fout.getvalue() |
|
141 | val = self.ui.fout.getvalue() | |
138 | self.ui.ferr, self.ui.fout = self.oldio |
|
142 | self.ui.ferr, self.ui.fout = self.oldio |
General Comments 0
You need to be logged in to leave comments.
Login now