Mercurial > hg
comparison mercurial/hgweb/request.py @ 36851:d6cd1451212e
hgweb: remove wsgirequest.read()
This was just a proxy to self.inp.read(). This method serves little
value. Let's nuke it.
Callers in the wire protocol server have been updated accordingly.
Differential Revision: https://phab.mercurial-scm.org/D2748
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 08 Mar 2018 17:57:07 -0800 |
parents | e85574176467 |
children | e3f809e0fe8e |
comparison
equal
deleted
inserted
replaced
36850:e85574176467 | 36851:d6cd1451212e |
---|---|
247 self.headers = [] | 247 self.headers = [] |
248 | 248 |
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) |
258 for s in util.filechunkiter(self.inp, limit=length): | 255 for s in util.filechunkiter(self.inp, limit=length): |
259 pass | 256 pass |