##// END OF EJS Templates
keepalive: be more careful about self._rbuf when calling super impls...
Augie Fackler -
r39841:1cf1680b default
parent child Browse files
Show More
@@ -417,9 +417,12 b' class HTTPResponse(httplib.HTTPResponse)'
417 s = self._rbuf[:amt]
417 s = self._rbuf[:amt]
418 self._rbuf = self._rbuf[amt:]
418 self._rbuf = self._rbuf[amt:]
419 return s
419 return s
420
420 # Careful! http.client.HTTPResponse.read() on Python 3 is
421 s = self._rbuf + self._raw_read(amt)
421 # implemented using readinto(), which can duplicate self._rbuf
422 # if it's not empty.
423 s = self._rbuf
422 self._rbuf = ''
424 self._rbuf = ''
425 s += self._raw_read(amt)
423 return s
426 return s
424
427
425 # stolen from Python SVN #68532 to fix issue1088
428 # stolen from Python SVN #68532 to fix issue1088
General Comments 0
You need to be logged in to leave comments. Login now