diff options
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index bb4b59e..5696467 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -438,6 +438,9 @@ class HTTPResponse: self.length = int(length) except ValueError: self.length = None + else: + if self.length < 0: # ignore nonsensical negative lengths + self.length = None else: self.length = None |