summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization (via reindent.py).Tim Peters2005-08-261-2/+2
|
* Bug #735248: Fix urllib2.parse_http_list.Georg Brandl2005-08-241-39/+36
|
* Bug 1016563: Bug in urllib2 proxy authGeorg Brandl2005-08-241-1/+1
|
* Whitespace normalization.Tim Peters2005-07-171-4/+4
|
* RFE [ 1216944 ] Add Error Code Dictionary to urllib2Georg Brandl2005-07-141-0/+49
|
* bug [ 1175848 ] poorly named variable in urllib2.pyGeorg Brandl2005-06-261-2/+2
|
* Replace list of constants with tuples of constants.Raymond Hettinger2005-02-061-1/+1
|
* SF patch #1028908Raymond Hettinger2005-02-051-3/+6
| | | | | | (John J Lee) Minor code clarification and simplification.
* Patch #1095362: replace hardcoded test for POST/GET with call to get_method,Johannes Gijsbers2005-01-091-1/+1
| | | | removing some duplication and gaining some flexibility in the process.
* Two small changes, SF bug #974757 and SF patch #1037974.Jeremy Hylton2004-12-221-6/+8
| | | | | | | | Pass the full URL to find_user_password(), in particular so that hosts with port numbers can be looked up. Also specify the digest algorithm, even if it's MD5. Titus Brown verified that this fixes a problem with LiveJournal.
* Added a usegmt flag to email.Utils.formatdate - this allows it to beAnthony Baxter2004-10-111-2/+2
| | | | | used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must be the timezone string).
* Use multi-line importAndrew M. Kuchling2004-08-311-3/+3
|
* Whitespace normalization.Tim Peters2004-08-081-3/+3
|
* Fix urllib2.urlopen() handling of chunked content encoding.Jeremy Hylton2004-08-071-2/+14
| | | | | | | | | | | | | | | | | 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 #994595: Recognize Basic auth even if other schemes are offered.Martin v. Löwis2004-08-031-1/+1
| | | | Will backport to 2.3.
* Patch [ 972332 ] urllib2 FTPHandler bugs / John J. LeeKurt B. Kaiser2004-07-111-2/+4
| | | | | Modified Files: urllib2.py test/test_urllib2.py
* [Patch #988602] Move the urllib2 tests into the test frameworkAndrew M. Kuchling2004-07-101-77/+0
|
* [Patch #988504] Fix HTTP error handling via a patch from John J. LeeAndrew M. Kuchling2004-07-101-10/+6
|
* [Bug #912845] urllib2 only checks for a 200 return code, but 206 is also ↵Andrew M. Kuchling2004-06-291-2/+2
| | | | | | legal if a Range: header was supplied. (Actually, should the first 'if' statement be modified to allow any 2xx status code?)
* Cleanup: the in operator already returns a bool, no need to bool() it againNeal Norwitz2004-06-071-4/+4
| | | | | Cleanup: use condition to be consistent with code above CookieJar is in cookielib
* Patch #963318: Add support for client-side cookie management.Martin v. Löwis2004-05-311-16/+59
|
* Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, asMark Hammond2004-05-101-1/+1
| | | | implemented in patch [ 851736 ].
* Patch #944110: Properly process empty passwords. Fixes #944082.Martin v. Löwis2004-05-061-1/+1
| | | | Backported to 2.3.
* Fix comment typoAndrew M. Kuchling2004-04-061-1/+1
|
* Fix two bugs in the new do_open() implementation for HTTPHandler.Jeremy Hylton2004-02-241-6/+17
| | | | | | | | | 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.
* Patch #711838: Allow non-anonymous ftp urls in urllib2.Martin v. Löwis2004-02-151-6/+15
| | | | Backported to 2.3.
* Patch #817379: Allow for absolute ftp paths.Martin v. Löwis2004-02-151-1/+1
| | | | Backported to 2.3.
* Whitespace normalization.Tim Peters2004-01-181-7/+7
|
* Rewrite AbstractHTTPHandler to use modern httplib interface.Jeremy Hylton2003-12-171-25/+26
| | | | | | | | | | | | The chief benefit of this change is that requests will now use HTTP/1.1 instead of HTTP/1.0. Bump the module version number as part of the change. There are two possible incompatibilities that we'll need to watch out for when we get to an alpha release. We may get a different class of exceptions out of httplib, and the do_open() method changed its signature. The latter is only important if anyone actually subclasses AbstractHTTPHandler.
* Remove __del__ methods to avoid creating uncollectable cyclic trash.Jeremy Hylton2003-12-151-13/+4
| | | | | | Keep close() methods for backwards compatibility. Does any call close() explicitly?
* SF patch 852995: add processors feature to urllib2Jeremy Hylton2003-12-141-56/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Apply patch 823328 -- support for rfc 2617 digestion authentication.Jeremy Hylton2003-10-211-44/+96
| | | | | | | | | | | | The patch was tweaked slightly. It's get a different mechanism for generating the cnonce which uses /dev/urandom when possible to generate less-easily-guessed random input. Also rearrange the imports so that they are alphabetical and duplicates are eliminated. Add a few XXX comments about things left undone and things that could be improved.
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* SF patch [ 816787 ] urllib2.URLError don't calll IOError.__init__Jeremy Hylton2003-10-061-1/+5
| | | | Not sure if this fix is great, but it's probably a small improvement.
* Patch 549151, rev4: redirect posts for 301 also. Will backport to 2.2.Martin v. Löwis2003-07-121-5/+5
|
* Fix wrong header name. The framework looks for auth_header.Jeremy Hylton2003-07-101-8/+10
|
* Change all header strings to be as if they were capitalize()'ed. Also callBrett Cannon2003-06-171-9/+9
| | | | | | capitalize in AbstractHTTPHandler before inserting headers into HTTP instance. Closes bug #649742, again.
* Whitespace normalization.Tim Peters2003-06-151-1/+1
|
* Patch #754340: Fix typo in redirect_request. Will backport to 2.2.Martin v. Löwis2003-06-141-1/+1
|
* - urllib2.py now knows how to order proxy classes, so the user doesn'tGustavo Niemeyer2003-06-071-11/+24
| | | | | | have to insert it in front of other classes, nor do dirty tricks like inserting a "dummy" HTTPHandler after a ProxyHandler when building an opener with proxy support.
* iteritems() should not have been used for self.timeout which changes during ↵Raymond Hettinger2003-05-231-1/+1
| | | | the loop.
* To be on the safe side, backed out any questionable iteritem changes and set ↵Brett Cannon2003-05-181-2/+2
| | | | back to item calls.
* Revert some changes back to dict.items made in a previous patch.Brett Cannon2003-05-171-2/+2
|
* Remove assert that checked if a parameter was an instance of Request. ↵Brett Cannon2003-05-121-1/+0
| | | | Closes patch #639139.
* Change Request.add_header to call string.capitalize in order to normalizeBrett Cannon2003-05-121-7/+8
| | | | | | headers and not have any dependency on case. Closes patch #649742. Also changed all instances of dict.items to dict.iteritems where appropriate.
* Better fix for newurl as suggested by Jim Jewett in SF bug #730963.Jeremy Hylton2003-05-051-12/+2
|
* Add comment explaining try/except for endheaders().Jeremy Hylton2003-05-051-0/+2
|
* Repair redirect handling and raise URLError on host-not-found.Jeremy Hylton2003-05-041-22/+36
| | | | | | | | | | | | | | The latest changes to the redirect handler couldn't possibly have been tested, because they did not compute a newurl and failed with a NameError. The __name__ == "__main__": block has a test for redirects. Also, fix SF bug 723831. A urlopen() that failed because the host was not found raised a socket.gaierror unlike earlier versions of urllib2. The problem is that httplib actually establishes the connection at a different point starting with Python 2.2. Move the try/except to endheaders(), which is where the connection gets established.
* SF Patch 549151: urllib2 POSTs on redirectRaymond Hettinger2003-04-241-4/+34
| | | | (contributed by John J Lee)
* Fix NameError exception ('name' undefined)Andrew M. Kuchling2002-11-061-0/+1
|