Commit Graph

217 Commits

Author SHA1 Message Date
Senthil Kumaran 73ae8dde6f Merged revisions 82897 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint

................
  r82897 | senthil.kumaran | 2010-07-15 01:52:17 +0530 (Thu, 15 Jul 2010) | 9 lines

  Merged revisions 82895 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r82895 | senthil.kumaran | 2010-07-15 01:40:52 +0530 (Thu, 15 Jul 2010) | 3 lines

    Fix a mistake, https proxy shoud be https://
  ........
................
2010-07-14 20:25:15 +00:00
Senthil Kumaran 7a4e837943 Merged revisions 82892 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint

................
  r82892 | senthil.kumaran | 2010-07-15 00:55:26 +0530 (Thu, 15 Jul 2010) | 9 lines

  Merged revisions 82890 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r82890 | senthil.kumaran | 2010-07-15 00:45:23 +0530 (Thu, 15 Jul 2010) | 3 lines

    Fix: Issue6853 - Get HTTPS system proxy in Windows.
  ........
................
2010-07-14 19:28:35 +00:00
Ronald Oussoren 68f74ba556 Merged revisions 82284 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82284 | ronald.oussoren | 2010-06-27 15:59:39 +0200 (Sun, 27 Jun 2010) | 4 lines

  Fix for Issue8883: without this patch test_urllib will fail
  when there is a bare IP address in the "Bypass proxy settings
  for these Hosts & Domains" list on MacOSX.
........
2010-06-27 14:00:56 +00:00
Senthil Kumaran fcfd25bd72 Merged revisions 80675 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80675 | senthil.kumaran | 2010-05-01 13:31:56 +0530 (Sat, 01 May 2010) | 3 lines

  Fix issue8582: urllib.urlretrieve fails with ValueError: Invalid format string
........
2010-05-01 08:06:38 +00:00
Senthil Kumaran 34f9277d56 Merged revisions 79047 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79047 | senthil.kumaran | 2010-03-18 17:44:15 +0530 (Thu, 18 Mar 2010) | 3 lines

  Fix for Issue8135 - urllib.unquote to support mixed percent escapes
........
2010-03-29 19:30:44 +00:00
Senthil Kumaran a241d0a8a2 Merged revisions 78268 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78268 | senthil.kumaran | 2010-02-21 03:35:34 +0530 (Sun, 21 Feb 2010) | 3 lines

  Fix for Issue7751: urllib.urlopen("///C|/foo/bar/spam.foo")
........
2010-02-20 22:13:01 +00:00
Georg Brandl 708c487abe Merged revisions 78035,78040,78043,78049-78050,78052-78054 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78035 | georg.brandl | 2010-02-06 23:44:17 +0100 (Sa, 06 Feb 2010) | 1 line

  Fix duplicate import.
........
  r78040 | georg.brandl | 2010-02-07 00:08:00 +0100 (So, 07 Feb 2010) | 1 line

  Fix a few UnboundLocalErrors in test_long.
........
  r78043 | georg.brandl | 2010-02-07 00:12:19 +0100 (So, 07 Feb 2010) | 1 line

  Remove duplicate test method.
........
  r78049 | georg.brandl | 2010-02-07 00:33:33 +0100 (So, 07 Feb 2010) | 1 line

  Fix import/access for some identifiers.  _TestSharedCTypes does not seem to be executed?
........
  r78050 | georg.brandl | 2010-02-07 00:34:10 +0100 (So, 07 Feb 2010) | 1 line

  Fix more unbound locals in code paths that do not seem to be used.
........
  r78052 | georg.brandl | 2010-02-07 00:54:04 +0100 (So, 07 Feb 2010) | 1 line

  Add missing import when running these tests standalone.
........
  r78053 | georg.brandl | 2010-02-07 00:54:43 +0100 (So, 07 Feb 2010) | 1 line

  Fix some name errors in Mac modules.
........
  r78054 | georg.brandl | 2010-02-07 00:58:25 +0100 (So, 07 Feb 2010) | 1 line

  Add missing import.
........
2010-02-07 12:01:19 +00:00
Ronald Oussoren c1bde6e14d Merged revisions 75482 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75482 | ronald.oussoren | 2009-10-18 09:07:00 +0200 (Sun, 18 Oct 2009) | 3 lines

  Fix for issue 7149: a regression in 2.6.3 that causes an exception when
  trying to detect proxy settings on OSX.
........
2009-10-18 07:08:27 +00:00
Ronald Oussoren 78974dff8f Merged revisions 74964 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74964 | ronald.oussoren | 2009-09-20 12:54:07 +0200 (Sun, 20 Sep 2009) | 2 lines

  Followup for r74962
........
2009-09-20 10:54:47 +00:00
Ronald Oussoren 40617a8eae Merged revisions 74962 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74962 | ronald.oussoren | 2009-09-20 12:31:22 +0200 (Sun, 20 Sep 2009) | 2 lines

  Fix for issue 6851: urllib.urlopen crashes in a thread on OSX 10.6
........
2009-09-20 10:37:33 +00:00
Senthil Kumaran b52c6f8c39 Fixing Issue6557. urllib.urlopen will quote the space character within urls. 2009-08-15 17:49:55 +00:00
Benjamin Peterson 373498fc67 Merged revisions 70521 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70521 | benjamin.peterson | 2009-03-22 12:45:11 -0500 (Sun, 22 Mar 2009) | 1 line

  close the file even if an exception occurs #5536
........
2009-03-22 17:49:21 +00:00
Benjamin Peterson 2c7470d951 #3879 fix a regression in urllib.getproxies_environment
reviewers: Benjamin, Georg
2008-09-21 21:27:51 +00:00
Brett Cannon 8bb8fa5dd6 Handle urllib's renaming for Python 3.0:
* Deprecate urllib.urlopen() in favor of urllib2.urlopen() for 3.0.
* Update docs to mention split/rename of the module and deprecation of
  urlopen().

Changes to lib2to3 are in a separate commit. Work is for issue #2885.
2008-07-02 01:57:08 +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
Ronald Oussoren 099646f29a MacOSX: ctypes annotation in implementation of getproxies_macosx_sysconf
getproxies_macosx_sysconf uses ctypes to call SystemConfiguration APIs. This
checkin adds ctypes annotation to specify the right argument types for the
API's that are used.

This is needed to be able to use urllib on a 64-bit system, without
annotations you'd get a hard crash.
2008-05-18 20:09:54 +00:00
Ronald Oussoren 9dd6b1db5b MacOSX: remove dependency on Carbon package for urllib
This patch removes the dependency on the Carbon package from urllib.
The mac-specific code for getting proxy configuration is now writting in
Python using ctypes and uses the SystemConfiguration framework instead of
InternetConfig. Also provides a mac-specific implementation of proxy_bypass.
2008-05-12 11:31:05 +00:00
Georg Brandl d5e6cf2b15 #1664522: in urllib, don't read non-existing directories in ftp mode,
returning a 0-byte file -- raise an IOError instead.
Original patch from Phil Knirsch.
2008-01-20 12:18:17 +00:00
Georg Brandl 2235011d49 #856047: respect the ``no_proxy`` env var when checking for proxies
in urllib and using the other ``_proxy`` env vars.
Original patch by Donovan Baarda.
2008-01-20 12:05:43 +00:00
Georg Brandl 9b0d46db11 #1178141: add addinfourl.code to get http status code from urllib. 2008-01-20 11:43:03 +00:00
Kurt B. Kaiser 0f7c25d20f Issue1177
r58207 and r58247 patch logic is reversed.  I noticed this when I
tried to use urllib to retrieve a file which required auth.

Fix that and add a test for 401 error to verify.
2008-01-02 04:11:28 +00:00
Georg Brandl 9b915673b7 #1177: accept 2xx responses for https too, not only http. 2007-09-24 18:08:24 +00:00
Sean Reifscheider a1afbf617d issue1177: Ported Facundo's from urllib2 to urllib, accepting 2xx responses. 2007-09-19 07:52:56 +00:00
Bill Janssen 426ea0a864 This contains a number of things:
1) Improve the documentation of the SSL module, with a fuller
   explanation of certificate usage, another reference, proper
   formatting of this and that.

2) Fix Windows bug in ssl.py, and general bug in sslsocket.close().
   Remove some unused code from ssl.py.  Allow accept() to be called on
   sslsocket sockets.

3) Use try-except-else in import of ssl in socket.py.  Deprecate use of
   socket.ssl().

4) Remove use of socket.ssl() in every library module, except for
   test_socket_ssl.py and test_ssl.py.
2007-08-29 22:35:05 +00:00
Facundo Batista 711a54ebde Added an optional timeout parameter to urllib.ftpwrapper, with tests
(for this and a basic one, because there weren't any). Changed also
NEWS, but didn't find documentation for this function, assumed it
wasn't public...
2007-05-24 17:50:54 +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 ce55e21c70 Try to get test_urllib to pass on Windows by closing the file.
I'm guessing that's the problem.  h.getfile() must be called *after*
h.getreply() and the fp can be None.

I'm not entirely convinced this is the best fix (or even correct).
The buildbots will tell us if things improve or not.  I don't
know if this needs to be backported (assuming it actually works).
2007-03-20 08:14:57 +00:00
Georg Brandl f66b6039c1 Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
2007-03-14 08:27:52 +00:00
Collin Winter 071d1ae136 Patch #1678662: ftp.python.org does not exist. So the testcode in urllib.py must use a more
stable FTP.
Will backport.
2007-03-12 01:55:54 +00:00
Georg Brandl 5a096e1b10 Use new email module names (#1637162, #1637159, #1637157). 2007-01-22 19:40:21 +00:00
Andrew M. Kuchling 522785732f [Patch #1617413 from Dug Song] Fix HTTP Basic authentication via HTTPS 2006-12-19 15:11:41 +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 0619a329e8 Bug #1459963: properly capitalize HTTP header names. 2006-07-26 07:40:17 +00:00
Georg Brandl 44a118af50 Patch #1470976: don't NLST files when retrieving over FTP. 2006-04-30 09:23:59 +00:00
Neal Norwitz c5d0dbd328 Fix a couple of strings that were no-ops. urllib.open_file was a docstring
in 2.4, so put it back.  The string in telnetlib looks like a comment.
2006-04-09 04:00:49 +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 1c168d8eeb Bug #1457264: parse http://host?query correctly in urllib 2006-03-26 20:59:38 +00:00
Georg Brandl 1f63670a2a Patch #1426648: urllib proxy_bypass broken 2006-02-18 23:10:23 +00:00
Tim Peters 92037a15a9 Whitespace normalization. 2006-01-24 22:44:08 +00:00
Martin v. Löwis 3e86595280 Patch #1349118: urllib2 now supports user:pass@ style proxy
specifications, raises IOErrors when proxies for unsupported protocols
are defined, and uses the https proxy on https redirections.
2006-01-24 15:51:21 +00:00
Georg Brandl c0b24734e0 Bug #649974: make docstrings for url2pathname consistent 2005-12-26 22:53:56 +00:00
Georg Brandl 1f663574ee bug #1365984: urllib and data: URLs. Problem was that cStringIO objects cannot be assigned attributes on the fly. 2005-11-26 16:50:44 +00:00
Raymond Hettinger 4b0f20def3 Teach unquote() to handle unicode inputs 2005-10-15 16:41:53 +00:00
Raymond Hettinger cf6b6326e5 Corrected version of 1.170 2005-09-10 18:17:54 +00:00
Raymond Hettinger 2bdec7bfb0 Revert 1.170. Add tests. 2005-09-10 14:30:09 +00:00
Raymond Hettinger 803ce801ab Simplify and speed-up unquote(). 2005-09-10 06:49:04 +00:00
Raymond Hettinger 957b126649 Simplify and speed-up quote_plus(). 2005-09-10 02:27:41 +00:00
Raymond Hettinger 199d2f7997 SF #1285086: urllib.quote is too slow
Simplify and speed-up quote() function.
2005-09-09 22:27:13 +00:00
Georg Brandl 5a650a253c patch [ 810023 ] Fix for off-by-one bug in urllib.URLopener.retrieve 2005-08-26 08:51:34 +00:00