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
f91149e4a1
Patch #1752270 , #1750931 : complain if urllib2 add_handler called
...
without handler.
2007-07-12 08:05:45 +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
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
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
dd7b0525e9
Patch #1627441 : close sockets properly in urllib2.
2007-01-21 10:35:10 +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
Georg Brandl
8c036ccf93
Patch #1542948 : fix urllib2 header casing issue. With new test.
2006-08-20 13:15:39 +00:00
Georg Brandl
0619a329e8
Bug #1459963 : properly capitalize HTTP header names.
2006-07-26 07:40:17 +00:00
Georg Brandl
261e251df8
Patches #1497027 and #972322 : try HTTP digest auth first,
...
and watch out for handler name collisions.
2006-05-29 20:52:54 +00:00
Georg Brandl
2b33037611
Patch #1496206 : urllib2 PasswordMgr ./. default ports
2006-05-28 20:23:12 +00:00
Neal Norwitz
b678ce5aa6
Little cleanup
2006-05-18 06:51:46 +00:00
Georg Brandl
9d6da3e2f2
Delay-import some large modules to speed up urllib2 import.
...
(fixes #1484793 ).
2006-05-17 15:17:00 +00:00
Georg Brandl
b5f2e5cc50
Patch #1479302 : Make urllib2 digest auth and basic auth play together.
2006-05-08 17:36:08 +00:00
Georg Brandl
852bb00818
Patch #1480067 : don't redirect HTTP digest auth in urllib2
2006-05-03 05:05:02 +00:00
Georg Brandl
bffb0bc064
In stdlib, use hashlib instead of deprecated md5 and sha modules.
2006-04-30 08:57:35 +00:00
Georg Brandl
fa42bd7af4
Patch #1470846 : fix urllib2 ProxyBasicAuthHandler.
2006-04-30 07:06:11 +00:00
Georg Brandl
7fff58c097
Readd urllib.quote import as it doesn't cause any harm.
2006-04-02 21:13:13 +00:00
Georg Brandl
c5ffd91911
Patch #1463012 : remove not working undocumented classes from urllib2
2006-04-02 20:48:11 +00:00
Georg Brandl
720096a6bf
Patch #1462790 : fix urllib2 ProxyHandler for host:port proxies
2006-04-02 20:45:34 +00:00
Georg Brandl
4eb521e595
bug #1462706 : guard against host not having FQDN hostname
2006-04-02 20:37:17 +00:00
Georg Brandl
814727582a
Update version number to 2.5
2006-03-31 20:02:40 +00:00
Georg Brandl
80bb2bb7eb
Revert r43399.
2006-03-28 19:19:56 +00:00
Georg Brandl
f1349cd05d
Bug #1459963 : urllib2 now normalizes HTTP header names correctly
...
with title().
2006-03-28 12:40:24 +00:00
Georg Brandl
ddb84d7c69
Bug #1353433 : be conciliant with spaces in redirect URLs
2006-03-18 11:35:18 +00:00
Tim Peters
e2c9a6cea7
Suppress new deprecation warnings when running the
...
test suite.
For urllib2, move the import of gopherlib into the
only function that uses it: users (including the
test suite) certainly shouldn't see a deprecation
warning just because they import urllib2! If they
actually use gopher_open(), fine, _then_ they should
see a deprecation warning.
2006-02-18 04:14:16 +00:00
Tim Peters
b6be87f9b0
Whitespace normalization.
2006-02-18 03:10:56 +00:00
Georg Brandl
6aab16e9f6
Move "httpresponses" dict from urllib2 to httplib where it belongs.
2006-02-17 19:17:25 +00:00
Georg Brandl
531cebad4c
Bug #902075 : urllib2 now handles "host:port" proxy specifications
...
Can/should this be backported?
2006-01-21 07:20:56 +00:00
Tim Peters
9e34c04732
Whitespace normalization (via reindent.py).
2005-08-26 15:20:46 +00:00
Georg Brandl
e1b13d2019
Bug #735248 : Fix urllib2.parse_http_list.
2005-08-24 22:20:32 +00:00
Georg Brandl
a5a2088dd7
Bug 1016563: Bug in urllib2 proxy auth
2005-08-24 20:29:32 +00:00
Tim Peters
f5f32b4712
Whitespace normalization.
2005-07-17 23:16:17 +00:00
Georg Brandl
5c5fe2f445
RFE [ 1216944 ] Add Error Code Dictionary to urllib2
2005-07-14 06:40:47 +00:00
Georg Brandl
8d457c78b4
bug [ 1175848 ] poorly named variable in urllib2.py
2005-06-26 22:01:35 +00:00
Raymond Hettinger
dbecd93b72
Replace list of constants with tuples of constants.
2005-02-06 06:57:08 +00:00
Raymond Hettinger
f7bf02ded5
SF patch #1028908
...
(John J Lee)
Minor code clarification and simplification.
2005-02-05 14:37:06 +00:00