Guido van Rossum
079381d236
Merge issue 11662 from 2.5.
2011-03-29 12:51:16 -07:00
guido@google.com
f1509306d2
Add tests for the urllib[2] vulnerability. Change to raise exceptions.
2011-03-28 13:47:01 -07:00
guido@google.com
2bc23b8448
Add FTP to the allowed url schemes. Add Misc/NEWS.
2011-03-24 10:44:17 -07:00
guido@google.com
60a4a90c8d
Issue 22663: fix redirect vulnerability in urllib/urllib2.
2011-03-24 08:07:45 -07:00
Senthil Kumaran
9d3c5c8a4c
Merged revisions 82782 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
................
r82782 | senthil.kumaran | 2010-07-11 08:48:51 +0530 (Sun, 11 Jul 2010) | 9 lines
Merged revisions 82780 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82780 | senthil.kumaran | 2010-07-11 08:42:43 +0530 (Sun, 11 Jul 2010) | 3 lines
Stricter verification for file based url scheme and reliance on ftp protocol.
........
................
2010-07-11 03:33:38 +00:00
Senthil Kumaran
7c7244bdef
Merged revisions 81636 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81636 | senthil.kumaran | 2010-06-01 18:10:07 +0530 (Tue, 01 Jun 2010) | 3 lines
Fix Issue8797 - urllib2 basic authentication fix for wrong passwords. It fails after 5 retries.
........
2010-06-01 12:42:44 +00:00
Senthil Kumaran
a9a9f696d5
Merged revisions 80957 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80957 | senthil.kumaran | 2010-05-08 10:30:11 +0530 (Sat, 08 May 2010) | 2 lines
Fixing the errors trigerred in test_urllib2net. Related to issue8656.
........
2010-05-08 05:03:45 +00:00
Senthil Kumaran
2add184b2d
Merged revisions 80953 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80953 | senthil.kumaran | 2010-05-08 08:41:50 +0530 (Sat, 08 May 2010) | 3 lines
Fix Issue8656 - urllib2 mangles file://-scheme URLs
........
2010-05-08 03:14:33 +00:00
Senthil Kumaran
7eda9e9082
Reverting the changes made in r78432. Discussed in the tracker issue7540.
2010-03-04 15:15:37 +00:00
Senthil Kumaran
4649299dc3
Merged revisions 78431 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78431 | senthil.kumaran | 2010-02-25 02:25:31 +0530 (Thu, 25 Feb 2010) | 4 lines
Fix for Issue7540 ; urllib2 will raise a TypeError when you try to add_data to
a existing req object already having data.
........
2010-02-24 20:58:58 +00:00
Senthil Kumaran
e3c651a836
Merged revisions 78422 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78422 | senthil.kumaran | 2010-02-24 22:15:46 +0530 (Wed, 24 Feb 2010) | 2 lines
Fix for Issue3819 - urllib2 sends Basic auth across redirects
........
2010-02-24 16:49:45 +00:00
Senthil Kumaran
c4151effad
Merged revisions 77058 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77058 | senthil.kumaran | 2009-12-27 14:41:09 +0530 (Sun, 27 Dec 2009) | 4 lines
Fix for issue5625 - test_urllib2 fails - urlopen error file not on local host.
This is on hosts with multiple ip addresses.
........
2009-12-27 09:16:30 +00:00
Senthil Kumaran
8116364b73
Merged revisions 76908 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76908 | senthil.kumaran | 2009-12-20 11:35:13 +0530 (Sun, 20 Dec 2009) | 4 lines
Fix for issue 7291 - urllib2 cannot handle https with proxy requiring auth
Refactored HTTPHandler tests and added testcase for proxy authorization.
........
2009-12-20 06:32:46 +00:00
Senthil Kumaran
10c858ac4d
Merged revisions 76288 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76288 | senthil.kumaran | 2009-11-15 14:06:20 +0530 (Sun, 15 Nov 2009) | 3 lines
Fix for Issue4683 - urllib2.HTTPDigestAuthHandler fails on third hostname?.
Resolution: Reset the nonce value for each unique nonce (as per RFC 2617)
........
2009-11-15 08:39:10 +00:00
Senthil Kumaran
f0bb435484
Merged revisions 76282 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76282 | senthil.kumaran | 2009-11-15 11:40:30 +0530 (Sun, 15 Nov 2009) | 3 lines
Addition of some details in the code comments.
........
2009-11-15 06:14:36 +00:00
Senthil Kumaran
dff2028a1b
Merged revisions 75333 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75333 | senthil.kumaran | 2009-10-11 07:30:07 +0530 (Sun, 11 Oct 2009) | 3 lines
Fixed Issue6894, urllib2 doesn't respect "no_proxy" environment
........
2009-10-11 05:35:44 +00:00
Senthil Kumaran
308681c405
Backporting the changes made in revision 72880 as fix for Issue1424152.
2009-07-26 12:36:08 +00:00
Senthil Kumaran
428e9d1d05
Fix for issue5102, timeout value propages between redirects, proxy, digest and
...
auth handlers. Fixed tests to reflect the same.
2009-07-19 04:20:46 +00:00
Brett Cannon
88f801d409
Update __all__ for cookielib, csv, os, and urllib2 for objects imported into
...
the module but exposed as part of the API.
2008-08-18 00:46:22 +00:00
Facundo Batista
94f243aa41
Issue 2464. Supports a malformation in the URL received
...
in a redirect.
2008-08-17 03:38:39 +00:00
Facundo Batista
eb90b788f4
Issue #2776 : fixed small issue when handling an URL with double slash
...
after a 302 response in the case of not going through a proxy.
2008-08-16 14:44:07 +00:00
Facundo Batista
4f1b1ed975
Fixed the semantic of timeout for socket.create_connection and
...
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, :)
2008-05-29 16:39:26 +00:00
Georg Brandl
8d66dcd0f4
#2695 : Do case-insensitive check for algorithms.
2008-05-04 21:40:44 +00:00
Amaury Forgeot d'Arc
8d904c3981
Issue #2670 : urllib2.build_opener() failed when two handlers
...
derive the same default base class.
Backport of r62463.
2008-04-22 21:17:18 +00:00
Amaury Forgeot d'Arc
9686585a82
Issue #2670 : urllib2.build_opener() failed when two handlers
...
derive the same default base class.
Will backport.
2008-04-22 21:14:41 +00:00
Georg Brandl
99bb5f3fef
#2585 : initialize code attribute of HTTPError.
2008-04-09 17:57:38 +00:00
Georg Brandl
331243270d
#2136 : allow single quotes in realm spec.
2008-03-21 19:54:00 +00:00
Facundo Batista
86371d61b7
Fixes Issue 1401. When redirected, a possible POST get converted
...
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).
2008-02-07 19:06:52 +00:00
Neal Norwitz
7070094d7f
Fix the test_urllib2net failures that were caused by r58067.
...
I'm not sure this is the correct fix, but at least the test passes
now and should be closer to correct.
2008-01-24 07:40:51 +00:00
Gregory P. Smith
e9fef694b4
Change socket.error to inherit from IOError rather than being a stand
...
alone class. This addresses the primary concern in
http://bugs.python.org/issue1706815
python-dev discussion here:
http://mail.python.org/pipermail/python-dev/2007-July/073749.html
I chose IOError rather than EnvironmentError as the base class since
socket objects are often used as transparent duck typed file objects
in code already prepared to deal with IOError exceptions.
also a minor fix:
urllib2 - fix a couple places where IOError was raised rather than URLError.
for better or worse, URLError already inherits from IOError so
this won't break any existing code.
test_urllib2net - replace bad ftp urls.
2007-09-09 23:36:46 +00:00
Georg Brandl
40df67f704
Patch #1752270 , #1750931 : complain if urllib2 add_handler called
...
without handler.
(backport from rev. 56293)
2007-07-12 08:05:48 +00:00
Georg Brandl
f91149e4a1
Patch #1752270 , #1750931 : complain if urllib2 add_handler called
...
without handler.
2007-07-12 08:05:45 +00:00
Georg Brandl
d2acc2e9c5
Patch #1667860 : Fix UnboundLocalError in urllib2.
...
(backport from rev. 55805)
2007-06-07 13:34:41 +00:00
Georg Brandl
ff8712263d
Patch #1667860 : Fix UnboundLocalError in urllib2.
2007-06-07 13:34:10 +00:00
Facundo Batista
10951d51e2
Added an optional timeout parameter to function urllib2.urlopen,
...
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.
2007-06-06 17:15:23 +00:00
Brett Cannon
d75f043c33
Remove the gopherlib module. It has been raising a DeprecationWarning since
...
Python 2.5.
Also remove gopher support from urllib/urllib2. As both imported gopherlib the
usage of the support would have raised a DeprecationWarning.
2007-05-16 22:42:29 +00:00
Neal Norwitz
0d4c06e06e
Whitespace normalization. Ugh, we really need to do this more often.
...
You might want to review this change as it's my first time. Be gentle. :-)
2007-04-25 06:30:05 +00:00
Neal Norwitz
112717dd0b
Fix SF #1703110 , Incorrect example for add_password() (use uri, not host)
2007-04-24 04:54:24 +00:00
Neal Norwitz
8eea9ac889
Fix SF #1703110 , Incorrect example for add_password() (use uri, not host)
2007-04-24 04:53:12 +00:00
Facundo Batista
9fab9f103f
As specified in RFC 2616, 2xx code indicates that the client's
...
request was successfully received, understood, and accepted.
Now in these cases no error is raised. Also fixed tests.
2007-04-23 17:08:31 +00:00
Georg Brandl
ceede5c359
Patch #1668100 : urllib2 now correctly raises URLError instead of
...
OSError if accessing a local file via the file:// protocol fails.
2007-03-13 08:14:27 +00:00
Tim Peters
ea5962f86e
Whitespace normalization.
2007-03-12 18:07:52 +00:00
Georg Brandl
fd13ef9c9c
Patch #812285 : allow multiple auth schemes in AbstractBasicAuthHandler.
...
(backport from rev. 54195)
2007-03-07 07:39:13 +00:00
Georg Brandl
172e7257f6
Patch #812285 : allow multiple auth schemes in AbstractBasicAuthHandler.
2007-03-07 07:39:06 +00:00
Facundo Batista
ca90ca81a4
Minor corrections to docs, and an explanation comentary
2007-03-05 16:31:54 +00:00
Georg Brandl
5a096e1b10
Use new email module names ( #1637162 , #1637159 , #1637157 ).
2007-01-22 19:40:21 +00:00
Georg Brandl
962e9165aa
Patch #1627441 : close sockets properly in urllib2.
...
(backport from rev. 53511)
2007-01-21 10:35:14 +00:00
Georg Brandl
dd7b0525e9
Patch #1627441 : close sockets properly in urllib2.
2007-01-21 10:35:10 +00:00
Andrew M. Kuchling
ff9e7abac8
[Patch #1574068 by Scott Dial] urllib and urllib2 were using
...
base64.encodestring() for encoding authentication data.
encodestring() can include newlines for very long input, which
produced broken HTTP headers.
2.4 backport candidate, probably.
2006-10-27 17:13:33 +00:00
Andrew M. Kuchling
872dba4253
[Patch #1574068 by Scott Dial] urllib and urllib2 were using
...
base64.encodestring() for encoding authentication data.
encodestring() can include newlines for very long input, which
produced broken HTTP headers.
2006-10-27 17:11:23 +00:00