##// END OF EJS Templates
hgweb: remove wsgirequest.read()...
Gregory Szorc -
r36867:d6cd1451 default
parent child Browse files
Show More
@@ -249,9 +249,6 class wsgirequest(object):
249 def __iter__(self):
249 def __iter__(self):
250 return iter([])
250 return iter([])
251
251
252 def read(self, count=-1):
253 return self.inp.read(count)
254
255 def drain(self):
252 def drain(self):
256 '''need to read all data from request, httplib is half-duplex'''
253 '''need to read all data from request, httplib is half-duplex'''
257 length = int(self.env.get('CONTENT_LENGTH') or 0)
254 length = int(self.env.get('CONTENT_LENGTH') or 0)
@@ -83,7 +83,7 class httpv1protocolhandler(wireprototyp
83 postlen = int(self._req.headers.get(b'X-HgArgs-Post', 0))
83 postlen = int(self._req.headers.get(b'X-HgArgs-Post', 0))
84 if postlen:
84 if postlen:
85 args.update(urlreq.parseqs(
85 args.update(urlreq.parseqs(
86 self._wsgireq.read(postlen), keep_blank_values=True))
86 self._wsgireq.inp.read(postlen), keep_blank_values=True))
87 return args
87 return args
88
88
89 argvalue = decodevaluefromheaders(self._req, b'X-HgArg')
89 argvalue = decodevaluefromheaders(self._req, b'X-HgArg')
@@ -97,7 +97,7 class httpv1protocolhandler(wireprototyp
97 # If httppostargs is used, we need to read Content-Length
97 # If httppostargs is used, we need to read Content-Length
98 # minus the amount that was consumed by args.
98 # minus the amount that was consumed by args.
99 length -= int(self._req.headers.get(b'X-HgArgs-Post', 0))
99 length -= int(self._req.headers.get(b'X-HgArgs-Post', 0))
100 for s in util.filechunkiter(self._wsgireq, limit=length):
100 for s in util.filechunkiter(self._wsgireq.inp, limit=length):
101 fp.write(s)
101 fp.write(s)
102
102
103 @contextlib.contextmanager
103 @contextlib.contextmanager
General Comments 0
You need to be logged in to leave comments. Login now