mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-02 03:44:43 +00:00
Close HTTP connections without body content. Github issue #376
This commit is contained in:
parent
a86e36e5d3
commit
707b7b7db1
2 changed files with 6 additions and 0 deletions
|
|
@ -16,6 +16,9 @@ Fixes:
|
|||
Closes: GH bug #369
|
||||
- checking: Catch UnicodeError from idna.encode() fixing an internal error when
|
||||
trying to connect to certain invalid hostnames.
|
||||
- checking: Always close HTTP connections without body content.
|
||||
See also http://bugs.python.org/issue16298
|
||||
Closes: GH bug #376
|
||||
|
||||
|
||||
8.3 "Mahna Mahna Killer" (released 6.1.2013)
|
||||
|
|
|
|||
|
|
@ -569,6 +569,9 @@ class HTTPResponse:
|
|||
self.length -= len(s)
|
||||
if not self.length:
|
||||
self.close()
|
||||
else:
|
||||
if not s:
|
||||
self.close()
|
||||
return s
|
||||
|
||||
def _read_chunked(self, amt):
|
||||
|
|
|
|||
Loading…
Reference in a new issue