Bugs item #1123695, was opened at 2005-02-16 01:06 Message generated for change (Comment added) made by ssokolow You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1123695&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: Open Resolution: None Priority: 5 Submitted By: Stephan Sokolow (ssokolow) Assigned to: Nobody/Anonymous (nobody) Summary: attempting to use urllib2 on some URLs fails starting on 2.4 Initial Comment: The following will work correctly on Python 2.3.3 but fails on Python 2.4 Python 2.4 (#1, Dec 4 2004, 01:33:42) [GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> urllib2.urlopen('http://www.fanfiction.net/s/636805/10/').read() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/socket.py", line 285, in read data = self._sock.recv(recv_size) File "/usr/local/lib/python2.4/httplib.py", line 456, in read return self._read_chunked(amt) File "/usr/local/lib/python2.4/httplib.py", line 495, in _read_chunked chunk_left = int(line, 16) ValueError: invalid literal for int(): ---------------------------------------------------------------------- >Comment By: Stephan Sokolow (ssokolow) Date: 2006-02-02 07:10 Message: Logged In: YES user_id=302370 For the record, I observed the problem on Gentoo Linux. ---------------------------------------------------------------------- Comment By: Wummel (calvin) Date: 2006-02-01 17:18 Message: Logged In: YES user_id=9205 I added a testcase mockup attachment at patch #900744: https://sourceforge.net/support/tracker.php?aid=900744 To reproduce with urllib2, start server.py and then execute: import urllib2 urllib2.urlopen("http://localhost:8000/").read() ---------------------------------------------------------------------- Comment By: John J Lee (jjlee) Date: 2006-02-01 15:38 Message: Logged In: YES user_id=261020 I can't reproduce this. 1. On what OS did you observe the failure? 2. Anybody have another example that does still trigger the bug? ---------------------------------------------------------------------- Comment By: Wummel (calvin) Date: 2005-02-16 11:38 Message: Logged In: YES user_id=9205 This bug is in httplib.py, and I already submitted patch 900744. I wonder why on Python 2.3 it seems to work though, it should fail the same way since this bug is also present in Python 2.3. But it might be some change in urllib2 that triggers this in Python 2.4 and not in Python 2.3. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1123695&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com