[Python-bugs-list] [Bug #132010] urllib and httplib fails to open url
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 18 Feb 2001 23:20:41 -0800
Bug #132010, was updated on 2001-Feb-12 08:51
Here is a current snapshot of the bug.
Project: Python
Category: Python Library
Status: Closed
Resolution: Wont Fix
Bug Group: None
Priority: 5
Submitted by: apederse
Assigned to : gstein
Summary: urllib and httplib fails to open url
Details: urllib and httplib fails to open the URL:
"http://www.redherring.com/". By examining network traffic a request and
response from server is taking place but python simply hangs with an
"connection reset by peer" when it tries to open this particular URL.
Fredrik Lundh had a work-around to this problem while using httplib by
doing an explicit socket.close(), however I believe that more people should
look into the problem and hopefully a fix could be available for both
urllib and httplib. The problem has been reported to fail under both
version 1.5.2 and 2.0, however I have only tested it under ver.1.5.2
for more details do also take a look at:
http://x61.deja.com/%5BST_rn=ps%5D/viewthread.xp?AN=725477609&search=thread&svcclass=dnyr&ST=PS&CONTEXT=981992343.458686528&HIT_CONTEXT=981992343.458686528&HIT_NUM=0&recnum=%3c95th67$36j$1@nnrp1.deja.com%3e%231/1&group=comp.lang.python&frpage=viewthread.xp&back=clarinet
Follow-Ups:
Date: 2001-Feb-18 23:20
By: gstein
Comment:
The TCP stack at www.redherring.com is flat out broken. There is nothing we
can do to fix this, short of a redesign of the httplib interface.
Essentially, if the entire HTTP request does not arrive in a single packet,
then redherring falls over. In fact, it won't even send a TCP ACK packet
for the first packet in the request. If the *whole* request arrives in one
packet, then it properly ACKs it and delivers the response.
Short of buffering up the request in the HTTPConnection object or
redesigning the API, there isn't much we can do to fix this bug. I also
think it is bad precedent to compensate for a flat-out busted TCP stack.
Workaround web server problems? maybe. But TCP stacks? Feh.
-------------------------------------------------------
Date: 2001-Feb-18 03:20
By: effbot
Comment:
reassigned to greg, who wrote the 2.0 code.
summary: the redherring server requires an explicit
shutdown before it starts returning data. From what
I can tell, httplib is doing everything by the book,
so it's probably a broken/braindead server. But it
does appear to work with most browsers...
-------------------------------------------------------
Date: 2001-Feb-13 02:15
By: tim_one
Comment:
Assigned to /F since he's already looked at this. So what's up with
redherring.com?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=132010&group_id=5470