comparison 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
comparison
equal deleted inserted replaced
32686:dd0bdeb0feee 32687:2806c7bbcb5e
351 # Both readline and readlines have been stolen with almost no 351 # Both readline and readlines have been stolen with almost no
352 # modification from socket.py 352 # modification from socket.py
353 353
354 354
355 def __init__(self, sock, debuglevel=0, strict=0, method=None): 355 def __init__(self, sock, debuglevel=0, strict=0, method=None):
356 httplib.HTTPResponse.__init__(self, sock, debuglevel, method) 356 httplib.HTTPResponse.__init__(self, sock, debuglevel=debuglevel,
357 strict=True, method=method)
357 self.fileno = sock.fileno 358 self.fileno = sock.fileno
358 self.code = None 359 self.code = None
359 self._rbuf = '' 360 self._rbuf = ''
360 self._rbufsize = 8096 361 self._rbufsize = 8096
361 self._handler = None # inserted by the handler later 362 self._handler = None # inserted by the handler later