Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotoserver.py @ 36857: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 | 0bc771bba220 |
children | 2cdf47e14c30 |
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py Sat Mar 10 10:46:08 2018 -0800 +++ b/mercurial/wireprotoserver.py Thu Mar 08 17:57:07 2018 -0800 @@ -83,7 +83,7 @@ postlen = int(self._req.headers.get(b'X-HgArgs-Post', 0)) if postlen: args.update(urlreq.parseqs( - self._wsgireq.read(postlen), keep_blank_values=True)) + self._wsgireq.inp.read(postlen), keep_blank_values=True)) return args argvalue = decodevaluefromheaders(self._req, b'X-HgArg') @@ -97,7 +97,7 @@ # If httppostargs is used, we need to read Content-Length # minus the amount that was consumed by args. length -= int(self._req.headers.get(b'X-HgArgs-Post', 0)) - for s in util.filechunkiter(self._wsgireq, limit=length): + for s in util.filechunkiter(self._wsgireq.inp, limit=length): fp.write(s) @contextlib.contextmanager