Bugs item #1469498, was opened at 2006-04-12 20:49 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1469498&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Richard Kasperski (rkasperski) Assigned to: Nobody/Anonymous (nobody) Summary: Exception when handling http response Initial Comment: When handling the return from a web server that dooes not return the content length(one I wrote) httplib takes an exception at line 478. The line of code in question is if self.length is not None: and should probably read if self.length is not None and self.length != _UNKNOWN: The problem is that self.length is no longer initialized to None ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2006-04-12 21:50 Message: Logged In: YES user_id=849994 It looks like you're getting a HTTP 0.9 response. In Python 2.4.0, self.length wasn't set in this case, but this bug was fixed in version 2.4.2. Closing this as Fixed, if the problem persists with Python 2.4.3 please reopen. ---------------------------------------------------------------------- Comment By: Richard Kasperski (rkasperski) Date: 2006-04-12 21:43 Message: Logged In: YES user_id=520350 Here is the version header from running python at the command line. Python 2.4 (#1, Feb 3 2005, 08:52:54 In my httplib.py length is initialized to _UNKNOWN which has the value "UNKNOWN" ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2006-04-12 21:31 Message: Logged In: YES user_id=849994 On which version of Python does this occur? In HEAD, all code paths in begin() lead to self.length being set to some value or None. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1469498&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com