summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
Commit message (Collapse)AuthorAgeFilesLines
* When a port is specified in an ftp:// URL, must convert it to a number!Guido van Rossum1997-12-021-0/+2
|
* Assert that the proxies object passed in to the URLopener constructorGuido van Rossum1997-11-181-0/+1
| | | | is indeed a dictionary (or a mapping).
* This should hopefully finally clean up the remaining __del__ relatedGuido van Rossum1997-10-271-9/+11
| | | | | problems with this module, even if an instance of a derived class is kept alive longer than the urllib module itself...
* splitpasswd(): The parameter is named "user", not "host".Fred Drake1997-10-141-1/+1
|
* Use sys.exc_info() where needed.Guido van Rossum1997-09-291-44/+106
| | | | Use "re" module, making it threadsafe.
* Initialize self.__tempfiles to [] in the constructor (else it remainsGuido van Rossum1997-09-081-0/+1
| | | | | a shared class variable -- but each instance will attempt to clean it up entirely ob cleanup).
* One patch from Sjoerd and one from Jack.Guido van Rossum1997-09-031-7/+14
| | | | | | | | | | | Sjoerd: add separate administration of temporary files created y URLopener.retrieve() so cleanup can properly remove them. The old code removed everything in tempcache which was a bad idea if the user had passed a non-temp file into it. (I added a line to delete the tempcache in cleanup() -- it still seems to make sense.) Jack: in basejoin(), interpret relative paths starting in "../". This is necessary if the server uses symbolic links.
* Explicitly close the socket and temp file in URLopener.retrieve(), soGuido van Rossum1997-08-261-0/+2
| | | | | | | | | that multiple retrievals using the same connection will work. This leaves open the more general problem that after f = urlopen("ftp://...") f must be closed before another retrieval from the same host should be attempted.
* Interpret three slashes in file: URL as local file (for Netscape onGuido van Rossum1997-08-201-4/+4
| | | | Windows/Mac).
* Clear the ftp cache when it contains more than 10 entries.Guido van Rossum1997-06-061-2/+21
|
* Catch *all* errors that ftplib can raise (ftplib.all_errors) ratherGuido van Rossum1997-06-061-8/+10
| | | | | | than just the four. Also folded some long lines.
* Add Host: header to URL request.Guido van Rossum1997-06-031-1/+5
|
* lowercase proxies env variables, for Windows.Guido van Rossum1997-05-281-0/+1
|
* spliturl() should not throw away everything past first newlineGuido van Rossum1997-04-161-2/+4
|
* (Jack+Guido:) interpret ../ in basejoin() according to RFC1808.Guido van Rossum1997-04-111-0/+7
|
* Open files in binary mode.Guido van Rossum1997-04-111-4/+4
|
* Fix two small bugs with proxies.Guido van Rossum1997-04-021-1/+2
|
* Put a new, more useful, set of references in the leading comment.Guido van Rossum1997-02-101-6/+13
|
* Move the 'import os' in URLopener.cleanup() to inside the blockGuido van Rossum1997-01-301-1/+1
| | | | | guarded by 'if self.tempcache', to reduce the likelihood of this causing an exception when invoked during __del__...
* Added quote_plus() and unquote_plus(), to do space/plus substitutionsGuido van Rossum1996-12-131-0/+14
| | | | for form field values.
* Add optional data argument to urlopen() and open_http(), to trigger POST.Guido van Rossum1996-12-101-9/+26
|
* Added safeguard against failure in __del__.Guido van Rossum1996-11-271-0/+2
|
* When re-raising an exception raised by a module used internally asGuido van Rossum1996-11-201-3/+5
| | | | IOError, keep the traceback.
* Fix the way the Authorization header is sent (how could this have worked?).Guido van Rossum1996-11-111-1/+1
|
* Fix another case where...Guido van Rossum1996-10-221-0/+1
|
* Fix some cases where self.openedurl wasn't set.Guido van Rossum1996-10-101-2/+3
|
* One fix by sjoerd and one suggested by him. Bumped __version__ to 1.5.Guido van Rossum1996-09-101-9/+24
| | | | | Fix 1: add a method geturl() to the file-like object returned by urlopen(). Fix 2: treat http error 301 the same as error 302.
* Bump exposed __version__ to 1.4.Guido van Rossum1996-08-261-6/+9
| | | | Correctly handle a URL containing user:password@host when using a proxy.
* Slightly faster (un)quoting.Guido van Rossum1996-08-261-8/+8
|
* add nturl2pathGuido van Rossum1996-06-261-0/+2
|
* Change defn of splitnport() to only accept valid digit strings.Guido van Rossum1996-06-171-10/+9
|
* Added splitnport(), which is like splitport() but returns a numeric port,Guido van Rossum1996-06-131-0/+17
| | | | | is forgiving about semi-numeric port numbers, and allows you to specify a default port (default is -1, None returned for nonnumeric port).
* Support optional filename argument for retrieve() and urlretrieve(),Guido van Rossum1996-06-111-8/+12
| | | | | to specify where it should go (if specified, even local files will be copied into the given file).
* move mac url2path conversion to separate moduleGuido van Rossum1996-03-211-50/+1
|
* Added proxy handling; upped version.Guido van Rossum1996-03-201-8/+44
| | | | (Proxy handling uses <proto>_proxy environment variables by default.)
* Try to normalize urls referring to local files (code copied from posixpath)Jack Jansen1996-02-141-3/+15
|
* speed up unquote() by using atoi() instead of eval()Guido van Rossum1996-01-261-1/+1
|
* Added pathname2url and url2pathname methods (only correct for unix andJack Jansen1995-12-211-7/+32
| | | | mac, so far)
* Fixed local file access for macintoshJack Jansen1995-12-151-2/+17
|
* Fixed basejoin. There were two main problems:Sjoerd Mullender1995-11-101-13/+37
| | | | | | | | | | | | | | - basejoin('some/url', '#name') would strip the last component of some/url and resturn some/#name. - basejoin('file.html', 'relative/path') would return something like file:/relative/path, making a relative path into an absolute one. These bugs are fixed by some drastic changes. No scheme is added when none is present (i.e. it works as replacement for posix.joinpath). If a scheme is present in the second argument, it is returned unprocessed. No hostname are added in this case. If no scheme is present, the scheme of the first argument, if present, is used. The algorithm is commented profusely. Also fixed a typo in a comment.
* support overriding how to open unknown url typesGuido van Rossum1995-08-291-13/+13
|
* Removed addbase.__del__ because it can't work.Sjoerd Mullender1995-08-151-2/+6
| | | | | If code keeps a reference to self.fp or any of its methods, you don't want to close self.fp just because no explicit reference is kept to self.
* changed version :-)Guido van Rossum1995-08-101-1/+1
|
* use mimetools; add error handling and authenticationGuido van Rossum1995-08-041-12/+129
|
* add User-agent hdr; read and close the file upon http errorGuido van Rossum1995-06-221-3/+14
|
* Add hacks for switching protocol and path but leaving host unchangedGuido van Rossum1994-12-301-2/+2
|
* Fix bug if tmpcache is NoneGuido van Rossum1994-09-211-1/+2
|
* New way of generating .pyc files, thanks to Sjoerd.Guido van Rossum1994-08-291-1/+1
| | | | | | urllib.py: '+' is not always safe (even though the RFC says so :-( ) whrandom.py: throw away top bits of time to avoid overflow on Mac (where times can be negative)
* * Lib/linecache.py: don't crash on empty filenameGuido van Rossum1994-08-231-10/+18
| | | | | | | | | | | * Lib/macpath.py: don't return trailing colon for dirname() (XXX won't do for volume names -- but otherwise glob(':*:*.py') loops forever) * Lib/traceback.py: print SyntaxError correctly * Lib/stat.py: moved to posixstat.py; added macstat.py which has the constants for the Mac; and created new stat.py which includes the right one * Lib/urllib.py: fix caching bug (by disabling the cache)
* * Lib/rfc822.py: fix two bugs: error in readheaders interpretingGuido van Rossum1994-08-121-1/+1
| | | | | regex.match() result, and wrong logic in getfirstmatchingheader() when the same header occurs twice consecutively