[issue1627] Problem with httplib and Content-Length: -1

Christian Heimes report at bugs.python.org
Tue Dec 18 23:07:21 CET 2007


Christian Heimes added the comment:

Your proposed fixed is not correct:

        length = self.msg.getheader("content-length")
        if length and not self.chunked:
            try:
                self.length = int(length)
            except ValueError:
                pass
        # patch
        if self.length < 0:
            self.length = None

----------
nosy: +tiran

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1627>
__________________________________


More information about the Python-bugs-list mailing list