]> granicus.if.org Git - python/commit
Fix two bugs in the new do_open() implementation for HTTPHandler.
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 24 Feb 2004 19:40:35 +0000 (19:40 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 24 Feb 2004 19:40:35 +0000 (19:40 +0000)
commitb3ee6f9921a0979b77a64b83f2f3a267ae66916e
treeb13f188022498f176284594a12ea0d4e9cb2f34d
parentf0ae4272b4b69576a51e5749820bf907799d1aca
Fix two bugs in the new do_open() implementation for HTTPHandler.

Invoke the standard error handlers for non-200 responses.

Always supply a "Connection: close" header to prevent the server from
leaving the connection open.  Downstream users of the socket may
attempt recv()/read() with no arguments, which would block if the
connection were kept open.
Lib/test/test_urllib2.py
Lib/urllib2.py