Mercurial > hg-stable
diff mercurial/keepalive.py @ 32687:2806c7bbcb5e
keepalive: pass the correct arguments to HTTPResponse
python2.7's httplib.HTTPResponse takes the arguments in the following order:
sock, debuglevel, strict, method, buffering
This was previously passing them in as positional and skipped strict, so we set
strict=method. I'm explicitly setting strict=True now to preserve the previous
behavior that has been there since this file was created.
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Thu, 01 Jun 2017 18:23:20 -0700 |
parents | aa836f56c3cc |
children | d7626e85dada |
line wrap: on
line diff
--- a/mercurial/keepalive.py Mon May 22 22:32:59 2017 -0400 +++ b/mercurial/keepalive.py Thu Jun 01 18:23:20 2017 -0700 @@ -353,7 +353,8 @@ def __init__(self, sock, debuglevel=0, strict=0, method=None): - httplib.HTTPResponse.__init__(self, sock, debuglevel, method) + httplib.HTTPResponse.__init__(self, sock, debuglevel=debuglevel, + strict=True, method=method) self.fileno = sock.fileno self.code = None self._rbuf = ''