summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
Commit message (Collapse)AuthorAgeFilesLines
* [Bug #776542] open_https() generates a bad Authorization header because it ↵Andrew M. Kuchling2003-08-291-1/+1
| | | | calls .putheader() wrongly. Reported by Steffen Ries.
* More fixes according to SF 549151:Guido van Rossum2003-05-161-4/+8
| | | | | | | | - When redirecting, always use GET. This is common practice and more-or-less sanctioned by the HTTP standard. - Add a handler for 307 redirection, which becomes an error for POST, but a regular redirect for GET and HEAD.
* SF Patch 549151: urllib2 POSTs on redirectRaymond Hettinger2003-04-241-0/+4
| | | | (contributed by John J Lee)
* Fix docstring for URLOpener.retrieve() in regards to opening a local fileBrett Cannon2003-04-241-1/+1
|
* SF 698520: Iterator for urllib.URLOpenerRaymond Hettinger2003-03-091-0/+4
| | | | Contributed by Brett Cannon.
* Get rid of many apply() calls.Guido van Rossum2003-02-271-4/+4
|
* Use fdopen() to create file from fd.Jeremy Hylton2002-10-111-1/+1
|
* When testing for localhost/ first map to lower case. Spotted by Skip.Jack Jansen2002-09-121-1/+1
|
* Treat file://localhost/ as local too (same as file:/ and file:///).Jack Jansen2002-09-121-1/+1
| | | | Fixes #607789, bugfix candidate.
* Modify splituser() method to allow an @ in the userinfo field.Raymond Hettinger2002-08-181-1/+1
| | | | | | | Jeremy reported that this is not allowed by RFC 2396; however, other tools support unescaped @'s so we should also. Apply SF patch 596581 closing bug 581529.
* Massive changes from SF 589982 (tempfile.py rewrite, by ZackGuido van Rossum2002-08-091-3/+5
| | | | | Weinberg). This changes all uses of deprecated tempfile functions to the recommended ones.
* Fix SF #565414, FancyURLopener() needs to support **kwargsNeal Norwitz2002-06-111-2/+2
| | | | since the URLopener base class does and **kwargs are used in urlopen.
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-8/+9
| | | | | | | | | | | | | | | | | | | | | | x in string.whitespace => x.isspace() type(x) in types.StringTypes => isinstance(x, basestring) isinstance(x, types.StringTypes) => isinstance(x, basestring) type(x) is types.StringType => isinstance(x, str) type(x) == types.StringType => isinstance(x, str) string.split(x, ...) => x.split(...) string.join(x, y) => y.join(x) string.zfill(x, ...) => x.zfill(...) string.count(x, ...) => x.count(...) hasattr(types, "UnicodeType") => try: unicode except NameError: type(x) != types.TupleTuple => not isinstance(x, tuple) isinstance(x, types.TupleType) => isinstance(x, tuple) type(x) is types.IntType => isinstance(x, int) Do not mention the string module in the rlcompleter docstring. This partially applies SF patch http://www.python.org/sf/562373 (with basestring instead of string). (It excludes the changes to unittest.py and does not change the os.stat stuff.)
* Replaced boolean tests with is None.Raymond Hettinger2002-06-021-5/+5
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-11/+11
|
* Don't require Unicode support.Guido van Rossum2002-05-241-2/+9
|
* Fix from SF bug #541980 (Jacques A. Vidrine).Guido van Rossum2002-04-151-1/+4
| | | | | | | When os.stat() for a file raises OSError, turn it into IOError per documentation. Bugfix candidate.
* Support manual proxy configuration for simple urlopen() operations.Fred Drake2002-04-041-5/+10
| | | | | | This change is similar to the supplied patch, but does not save the opener when a proxy configuration is specified. This closes SF patch #523415.
* Fix for a bug in the fix for SF bug 503031. This time the OP verifiedGuido van Rossum2002-04-021-2/+2
| | | | | | that it works. Bugfix candidate (this and the previous checkin, obviously).
* Hopeful fix for SF bug 503031: urllib.py: open_http() host problem.Guido van Rossum2002-03-311-1/+5
| | | | | | | I really can't test this, but from reading the discussion in that bug report, it's likely that this works. It may also close a whole bunch of other bug reports related to urllib and proxies on Windows, but who knows.
* time and socket were already imported in the module, no need to re-importNeal Norwitz2002-03-261-3/+1
|
* use stat attributes instead of tuple entriesWalter Dörwald2002-03-221-3/+2
| | | | and remove the unneccessary "import stat" statement.
* To make 'urllib.py -t' run again, change FTP URL to a file that actuallyAndrew M. Kuchling2002-03-181-1/+1
| | | | exists.
* SF #515024 remove unused variableNeal Norwitz2002-02-111-1/+0
|
* SF patch #490515 (Joe A) urllib.open_https() protocol issueGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | open_http(): In urllib.py library module, URLopener.open_https() returns a class instance of addinfourl() with its self.url property missing the protocol. Instead of "https://www.someurl.com", it becomes "://www.someurl.com".
* Added missing parameter in call to http_error_default();Fred Drake2001-10-131-1/+1
| | | | reported by Neal Norwitz.
* Add content-type header to ftp URLs (SF patch #454553)Jeremy Hylton2001-08-271-8/+2
| | | | | | | | Modify rfc822.formatdate() to always generate English names, regardless of locale. This is required by RFC 1123. In open_local_file() of urllib and urllib2, use new formatdate() from rfc822.
* SF patch #454553 by Walter Dörwald: auto-guess content-type header forGuido van Rossum2001-08-231-5/+7
| | | | ftp urls.
* Only catch the errors that can actually occur, as reported in bug #411881.Martin v. Löwis2001-08-111-2/+2
|
* Whitespace normalization.Tim Peters2001-08-091-3/+3
|
* SF patch #403640: incomplete proxy handling in URLLIBTim Peters2001-08-091-0/+62
| | | | Look specific to Windows. Don't know whether it works.
* SF Patch #420725 by Walter Doerwald:Guido van Rossum2001-08-091-4/+17
| | | | | | | | | | | | | | | | | | | | For local files urllib.py doesn't return the MIME headers that the documentation says it does: http://www.python.org/doc/current/lib/module- urllib.html#l2h-2187 states that "When the method is local-file, returned headers will include a Date representing the file's last-modified time, a Content- Length giving file size, and a Content-Type containing a guess at the file's type" But in Python 2.1 the only header that gets returned is the Content-Type: >>> import urllib >>> f = urllib.urlopen("gurk.txt") >>> f.info().headers ['Content-Type: text/plain\n']
* Only write out one blank line before the request data.Fred Drake2001-07-041-2/+2
| | | | This closes SF patch #419459.
* Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.Guido van Rossum2001-04-151-0/+2
| | | | Reported by Juan M. Bello Rivas.
* fixing 408085 - redirect from https becomes httpMoshe Zadka2001-04-091-1/+1
| | | | | | | | Even though relative redirects are illegal, they are common urllib treated every relative redirect as though it was to http, even if the original was https:// As long as we're compensating for server bugs, might as well do it properly.
* updated __all__ to include several other namesSkip Montanaro2001-03-131-1/+5
|
* Grr, splittag was also missing from __all__.Jack Jansen2001-03-051-1/+1
|
* Added url2pathname and pathname2url to __all__.Jack Jansen2001-03-051-1/+1
|
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-021-0/+2
|
* final round of __all__ lists (I hope) - skipped urllib2 because Moshe may beSkip Montanaro2001-03-011-0/+4
| | | | giving it a slight facelift
* Whitespace normalization.Tim Peters2001-02-281-3/+3
|
* Fixing bug #227562 by calling URLopener.http_error_default whenMoshe Zadka2001-02-271-12/+18
| | | | an invalid 401 request is being handled.
* provide simple recovery/escape from apparent redirect recursion. If theSkip Montanaro2001-02-151-1/+17
| | | | | | number of entries into http_error_302 exceeds the value set for the maxtries attribute (which defaults to 10), the recursion is exited by calling the http_error_500 method (or if that is not defined, http_error_default).
* Whitespace normalization.Tim Peters2001-02-091-1/+1
|
* allow first param urlencode to be a sequence of two-element tuples - in thisSkip Montanaro2001-01-281-5/+30
| | | | case, the order of parameters in the output matches the order of the inputs.
* modify urlencode so sequences in the dict are treated as multivaluedSkip Montanaro2001-01-201-6/+36
| | | | parameters. This closes the code part of patch 103314.
* Anonymous SF bug 129288: "The python 2.0 urllib has %%%x as a formatGuido van Rossum2001-01-191-2/+2
| | | | | | | when quoting forbidden characters. There are scripts out there that break with lower case, therefore I guess %%%X should be used." I agree, so am fixing this.
* - Make sure to quote the username and password (SF patch #103236 byGuido van Rossum2001-01-151-3/+3
| | | | | | | dogfort). - Don't drop the data argument when calling open_https() from the authentication error handler.
* Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters2001-01-151-13/+13
|
* Fixed bug which caused HTTPS not to work at all with string URLsMoshe Zadka2001-01-081-1/+1
|