summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed Issue1424152, urllib2 fails with HTTPS over Proxy.Senthil Kumaran2009-05-241-0/+15
|
* Add simple unittests for RequestJeremy Hylton2008-12-091-1/+47
|
* Issue #2776: fixed small issue when handling an URL with double slashFacundo Batista2008-08-161-0/+26
| | | | after a 302 response in the case of not going through a proxy.
* Fixed the semantic of timeout for socket.create_connection andFacundo Batista2008-05-291-3/+5
| | | | | | all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
* Issue #2670: urllib2.build_opener() failed when two handlersAmaury Forgeot d'Arc2008-04-221-0/+6
| | | | | | derive the same default base class. Will backport.
* #2136: allow single quotes in realm spec.Georg Brandl2008-03-211-2/+6
|
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-3/+3
|
* Fixes Issue 1401. When redirected, a possible POST get convertedFacundo Batista2008-02-071-0/+9
| | | | | | to GET, so it loses its payload. So, it also must lose the headers related to the payload (if it has no content any more, it shouldn't indicate content length and type).
* Patch #1752270, #1750931: complain if urllib2 add_handler calledGeorg Brandl2007-07-121-0/+6
| | | | without handler.
* Added an optional timeout parameter to function urllib2.urlopen,Facundo Batista2007-06-061-3/+7
| | | | | | | with tests in test_urllib2net.py (must have network resource enabled to execute them). Also modified test_urllib2.py because testing mock classes must take it into acount. Docs are also updated.
* As specified in RFC 2616, 2xx code indicates that the client'sFacundo Batista2007-04-231-3/+11
| | | | | request was successfully received, understood, and accepted. Now in these cases no error is raised. Also fixed tests.
* Patch #1668100: urllib2 now correctly raises URLError instead ofGeorg Brandl2007-03-131-5/+5
| | | | OSError if accessing a local file via the file:// protocol fails.
* Patch #1542948: fix urllib2 header casing issue. With new test.Georg Brandl2006-08-201-7/+70
|
* Bug #1459963: properly capitalize HTTP header names.Georg Brandl2006-07-261-7/+7
|
* Patches #1497027 and #972322: try HTTP digest auth first,Georg Brandl2006-05-291-6/+55
| | | | and watch out for handler name collisions.
* Patch #1496206: urllib2 PasswordMgr ./. default portsGeorg Brandl2006-05-281-3/+51
|
* ("Forward-port" of r46506)Armin Rigo2006-05-281-0/+1
| | | | | | | | | | | | | | Remove various dependencies on dictionary order in the standard library tests, and one (clearly an oversight, potentially critical) in the standard library itself - base64.py. Remaining open issues: * test_extcall is an output test, messy to make robust * tarfile.py has a potential bug here, but I'm not familiar enough with this code. Filed in as SF bug #1496501. * urllib2.HTTPPasswordMgr() returns a random result if there is more than one matching root path. I'm asking python-dev for clarification...
* Patch #1479302: Make urllib2 digest auth and basic auth play together.Georg Brandl2006-05-081-0/+21
|
* Move network tests from test_urllib2 to test_urllib2net.Georg Brandl2006-05-031-134/+0
|
* Patch #1470846: fix urllib2 ProxyBasicAuthHandler.Georg Brandl2006-04-301-34/+183
|
* Use absolute importsNeal Norwitz2006-04-031-1/+1
|
* Whitespace normalization.Tim Peters2006-04-031-2/+2
|
* Patch #1462790: fix urllib2 ProxyHandler for host:port proxiesGeorg Brandl2006-04-021-3/+21
|
* Bug #1250170, Patch #1462230: handle socket.gethostname()Georg Brandl2006-03-311-4/+10
| | | | failures gracefully
* Revert r43399.Georg Brandl2006-03-281-6/+6
|
* Bug #1459963: urllib2 now normalizes HTTP header names correctlyGeorg Brandl2006-03-281-6/+6
| | | | with title().
* test_gopher(): Squash another deprecationTim Peters2006-02-191-0/+5
| | | | warning about gopherlib.
* Move test case for HTTP response dict to httplib.Georg Brandl2006-02-171-4/+0
|
* Bug #735248: Fix urllib2.parse_http_list.Georg Brandl2005-08-241-0/+8
|
* Whitespace normalization.Tim Peters2005-07-171-1/+1
|
* RFE [ 1216944 ] Add Error Code Dictionary to urllib2Georg Brandl2005-07-141-0/+4
|
* Fix urllib2.urlopen() handling of chunked content encoding.Jeremy Hylton2004-08-071-0/+2
| | | | | | | | | | | | | | | | | The change to use the newer httplib interface admitted the possibility that we'd get an HTTP/1.1 chunked response, but the code didn't handle it correctly. The raw socket object can't be pass to addinfourl(), because it would read the undecoded response. Instead, addinfourl() must call HTTPResponse.read(), which will handle the decoding. One extra wrinkle is that the HTTPReponse object can't be passed to addinfourl() either, because it doesn't implement readline() or readlines(). As a quick hack, use socket._fileobject(), which implements those methods on top of a read buffer. (suggested by mwh) Finally, add some tests based on test_urllibnet. Thanks to Andrew Sawyers for originally reporting the chunked problem.
* Patch [ 972332 ] urllib2 FTPHandler bugs / John J. LeeKurt B. Kaiser2004-07-111-10/+7
| | | | | Modified Files: urllib2.py test/test_urllib2.py
* [Patch #988602] Move the urllib2 tests into the test frameworkAndrew M. Kuchling2004-07-101-1/+129
|
* Whitespace normalization.Tim Peters2004-07-081-1/+1
|
* Remove unused import. (If it's there for some deep, dark reason, it should ↵Andrew M. Kuchling2004-06-291-1/+0
| | | | have been commented.)
* Add test case for bug #912845: requesting an HTTP byte range doesn't workAndrew M. Kuchling2004-06-291-6/+16
|
* Patch #963318: Add support for client-side cookie management.Martin v. Löwis2004-05-311-23/+76
|
* Fix two bugs in the new do_open() implementation for HTTPHandler.Jeremy Hylton2004-02-241-1/+2
| | | | | | | | | 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.
* Whitespace normalization.Tim Peters2004-01-181-19/+21
|
* Remove methods that are no longer called by urllib2.Jeremy Hylton2003-12-171-14/+0
|
* Add methods to MockHTTPClass for modern httplib interface.Jeremy Hylton2003-12-171-51/+77
| | | | Replace lots of assert_(x == y) with assertEqual(x, y).
* SF patch 852995: add processors feature to urllib2Jeremy Hylton2003-12-141-29/+614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | John J. Lee writes: "the patch makes it possible to implement functionality like HTTP cookie handling, Refresh handling, etc. etc. using handler objects. At the moment urllib2's handler objects aren't quite up to the job, which results in a lot of cut-n-paste and subclassing. I believe the changes are backwards-compatible, with the exception of people who've reimplemented build_opener()'s functionality -- those people would need to call opener.add_handler(HTTPErrorProcessor). The main change is allowing handlers to implement methods like: http_request(request) http_response(request, response) In addition to the usual http_open(request) http_error{_*}(...) " Note that the change isn't well documented at least in part because handlers aren't well documented at all. Need to fix this. Add a bunch of new tests. It appears that none of these tests actually use the network, so they don't need to be guarded by a resource flag.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-0/+5
|
* Whitespace normalization.Tim Peters2001-09-041-1/+1
|
* A quick hack to make the test pass on the Mac (similar to the quick hackJack Jansen2001-08-271-0/+4
| | | | to make it pass on Windows:-).
* This has never worked on Windows. Now it does. If it breaks on Unix now,Tim Peters2001-07-161-1/+7
| | | | great, it's your turn to watch it fail for months <0.9 wink>.
* Whitespace normalization.Tim Peters2001-05-291-1/+0
|
* Trivial tests of urllib2 for recent SF bugJeremy Hylton2001-05-091-0/+17