Index: Lib/httplib.py =================================================================== --- Lib/httplib.py (revision 60122) +++ Lib/httplib.py (working copy) @@ -438,7 +438,11 @@ try: self.length = int(length) except ValueError: - self.length = None + pass + + if self.length < 0: + self.length = None + else: self.length = None