[Python-checkins] python/dist/src/Lib/test test_urllib2.py, 1.11, 1.12

jhylton at users.sourceforge.net jhylton at users.sourceforge.net
Tue Feb 24 14:40:39 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1119/test

Modified Files:
	test_urllib2.py 
Log Message:
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.


Index: test_urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllib2.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** test_urllib2.py	18 Jan 2004 20:29:55 -0000	1.11
--- test_urllib2.py	24 Feb 2004 19:40:35 -0000	1.12
***************
*** 462,466 ****
              self.assertEqual(http.selector, "/")
              self.assertEqual(http.req_headers,
!                              [("Foo", "bar"), ("Spam", "eggs")])
              self.assertEqual(http.data, data)
  
--- 462,467 ----
              self.assertEqual(http.selector, "/")
              self.assertEqual(http.req_headers,
!                              [("Connection", "close"),
!                               ("Foo", "bar"), ("Spam", "eggs")])
              self.assertEqual(http.data, data)
  




More information about the Python-checkins mailing list