summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Get rid of string functions, except maketrans() (which is *not*Guido van Rossum2000-12-151-42/+45
| | | | | | | | | obsolete!). Fix a bug in ftpwrapper.retrfile() where somehow ftplib.error_perm was assumed to be a string. (The fix applies str().) Also break some long lines and change the output from test() slightly.
* Convert Unicode strings to byte strings before passing them into specificMartin v. Löwis2000-12-031-14/+25
| | | | protocols. Closes bug #119822.
* Provide a clearer error message when urlopen fails because of anJeremy Hylton2000-10-021-5/+13
| | | | | | | | | | invalid proxy setting. Minor change to call of unknown_url; always pass data argument explicitly since data defaults to None. PEP 42: Add as a feature that urllib handle proxy setting that contain only the host and port of the proxy.
* - Improved handling of win32 proxy settings (addresses bug #114256).Fredrik Lundh2000-09-241-22/+27
| | | | | | | The earlier code assumed "protocol=host;protocol=host;..." or "host", but Windows may also use "protocol=host" (just one entry), as well as "protocol://host". This code needs some more work, so I'll leave the bug open for now.
* Remove "," from the list of always_safe characters. It is a reservedJeremy Hylton2000-09-141-8/+44
| | | | | | | | | | character according to RFC 2396. Add some text to quote doc string that explains the quoting rules better. This closes SF Bug #114427. Add _fast_quote operation that uses a dictionary instead of a list when the standard set of safe characters is used.
* fixes bug #111951Jeremy Hylton2000-08-311-2/+3
| | | | | | applies patch #101369 by Moshe Zadke use explicit list of always safe characters instead of string.letters add test case
* Pass data on to retrieve method.Sjoerd Mullender2000-08-251-1/+1
| | | | Don't people *test* their changes?
* Promote the server version from a local variable to a class variable,Guido van Rossum2000-08-241-3/+4
| | | | | | | | | | so that a subclass can override it. This partly addresses Bug #112634 -- but the documentation is still wrong, since it suggests that you can set self.version *after* calling the base class __init__. In fact it must be done *before*. I'll fix that too.
* Randall Hopper <aa8vb@yahoo.com>>:Fred Drake2000-08-241-3/+3
| | | | Make it easier to use HTTP POST with urlretrieve().
* * added doc strings to urlopen and unquote_plusSkip Montanaro2000-08-221-1/+3
| | | | * fixed type in doc string for quote
* Patch from Paul Schreiber <paul@commerceflow.com>:Fred Drake2000-08-211-6/+19
| | | | | | | | | | | | | | | | | | Patch description ----------------- This addresses four issues: (1) usernames and passwords in urls with special characters are now decoded properly. i.e. http://foo%2C:bar@www.whatever.com/ (2) Basic Auth support has been added to HTTPS, like it was in HTTP. (3) Version 1.92 sent the POSTed data, but did not deal with errors (HTTP responses other than 200) properly. HTTPS now behaves the same way HTTP does. (4) made URL-checking beahve the same way with HTTPS as it does with HTTP (changed == to !=).
* Patch #100873 - Use registry to find proxies for urllib on Win32Mark Hammond2000-07-261-13/+61
| | | | Note that this patch looks worse than it is - an existing function (getproxies() for all platforms other than Win/Mac) has been moved, renamed and indentation changed, but the body of that function is identical. Windows now allows the environment variables to override the registry.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Fix bug #314, reported by Craig Allen <cba@mediaone.net>:Fred Drake2000-07-011-1/+1
| | | | | splittype(): Always lower-case the URL scheme; these are supposed to be normalized according to RFC 1738 anyway.
* Comment out an apparent debug printAndrew M. Kuchling2000-06-101-1/+1
|
* Fix a problem reported by Oleg Broytmann, who complains that veryGuido van Rossum2000-05-241-1/+1
| | | | | | | | | | | | often, ftp URLs hang in the final close. Further analysis suggests that this is because the close hook in addclosehook() calls the hook before acually closing the connection. The hook, in this case, waits for the '226 Transfer complete' status from the server on the command socket. However, more and more ftp servers only send this status when the data socket has actually been closed -- causing a deadlock. The fix is simple: in addclosehook.close(), call addbase.close() *before* calling the closehook.
* Fix to previous patch: send the request data when it's providedAndrew M. Kuchling2000-04-241-0/+2
|
* Fixed bug reported by JP Calderone: https:// URL's didn't work.Andrew M. Kuchling2000-04-231-2/+8
| | | | The fix also adds support for POSTing to an https URL
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-041-79/+108
| | | | | | | | The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Sjoerd Mullender writes:Guido van Rossum2000-02-011-5/+14
| | | | | | | | | | | | Fixed a TypeError: not enough arguments; expected 4, got 3. When authentication is needed, the default http_error_401 method calls retry_http_basic_auth. The default version of that method expected a data argument which wasn't provided, so now we provide the argument if it was given and we also made the data argument optional. Also changed other calls where data was optional to not pass data if it was not passed to the calling method (in line with other similar occurances).
* OpenSSL support. This is based on patches for a version of SSLeay byGuido van Rossum1999-12-071-5/+57
| | | | | | Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by Laszlo Kovacs of HP. Both have kindly given permission to include the patches in the Python distribution. Final formatting by GvR.
* Patches by Michael Reilly to correctly deal with ftp URLs of the formGuido van Rossum1999-08-181-0/+1
| | | | | ftp://user@host//root/path: the double slash in the pathname means to go to the root directory even if the initial directory isn't the root.
* Sjoerd Mullender:Guido van Rossum1999-07-011-1/+1
| | | | | | In splithost, accept empty host part in URLs. This is required for file URLs that can have an empty host part. For such URLs, we should not return the initial 2 slashes as part of the file name.
* Sjoerd Mullender writes:Guido van Rossum1999-06-241-2/+8
| | | | | | | | | | | Urllib makes the URL of the opened file available through the geturl method of the returned object. For local files, this consists of file: plus the name of the file. This results in an invalid URL if the file name was relative. This patch fixes this so that the returned URL is just a relative URL in that case. When the file name is absolute, the URL returned is of the form file:///absolute/path. [I guess that a URL of the form "file:foo.html" is illegal... GvR]