summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix NameError exception ('name' undefined)Andrew M. Kuchling2002-11-061-0/+1
|
* Typo in docstringJeremy Hylton2002-10-111-1/+1
|
* Fix for SF bug #599836: Don't duplicate headers.Jeremy Hylton2002-10-111-2/+3
| | | | | If the request object has a header, it should override the default header provided by the OpenerDirector.
* SF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42)Neal Norwitz2002-10-091-1/+1
| | | | Make the regex case insensitive for some web sites which use Realm.
* Remove ugly irregular spaces from in front of some comments.Fred Drake2002-08-131-3/+3
|
* Whitespace normalization.Tim Peters2002-07-161-2/+2
|
* Fix from SF patch #527518: proxy config with user+pass authentication.Jeremy Hylton2002-07-071-3/+8
| | | | Bug fix candidate.
* Fix HTTPError __init__ for cases where fp is None.Jeremy Hylton2002-06-031-2/+6
| | | | | | | | | | | | | | | | | | | | | The HTTPError class tries to act as a regular response objects for HTTP protocol errors that include full responses. If the failure is more basic, like no valid response, the __init__ choked when it tried to initialize its superclasses in addinfourl hierarchy that requires a valid response. The solution isn't elegant but seems to be effective. Do not initialize the base classes if there isn't a file object containing the response. In this case, user code expecting to use the addinfourl methods will fail; but it was going to fail anyway. It might be cleaner to factor out HTTPError into two classes, only one of which inherits from addinfourl. Not sure that the extra complexity would lead to any improved functionality, though. Partial fix for SF bug # 563665. Bug fix candidate for 2.1 and 2.2.
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-4/+3
| | | | | | | | | | | | | | | | | | | | | | 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.)
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-10/+10
|
* Use types.StringTypes instead of (types.StringType, types.UnicodeType) --Michael W. Hudson2002-05-201-2/+2
| | | | | | works better (at all!) in --disable-unicode builds. Bugfix candidate, probably.
* Partial introduction of bools where appropriate.Guido van Rossum2002-04-071-4/+4
|
* Patch #525870: Avoid duplicate stat calls, use st_ attributes.Martin v. Löwis2002-03-181-4/+2
|
* Fix bug #511786 (2.2.1 candidate): ensure that custom-supplied headersGreg Ward2002-02-111-1/+1
| | | | are preserved for redirected requests.
* Fix SF bug 468948 & 451295: urllib2 authentication problemsJeremy Hylton2001-11-091-28/+12
| | | | | | | | | | | | | | | | | | | Fix contributed by Jeffrey C. Ollie. I haven't tested the fix because the situation is non-trivial to reproduce. The basic solution is to get rid of the __current_realm attribute of authentication handlers. Instead, prevent infinite retries by checking for the presence of an Authenticate: header in the request object that exactly matches the Authenticate: header that would be added. The problem prevent authentication from working correctly in the presence of retries. Ollie mentioned that digest authentication has the same problem and I applied the same solution there.
* Clean up one comment, fix typos in others.Fred Drake2001-11-081-7/+7
|
* Fix [ #465502 ] urllib2: urlopen unicode problemJeremy Hylton2001-10-091-67/+36
| | | | | | | | When checking for strings use, ! if isinstance(uri, (types.StringType, types.UnicodeType)): Also get rid of some dodgy code that tried to guess whether attributes were callable or not.
* Add content-type header to ftp URLs (SF patch #454553)Jeremy Hylton2001-08-271-4/+13
| | | | | | | | 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: add content-type to FTP URLs, likeGuido van Rossum2001-08-241-4/+7
| | | | for urllib.
* Replace all type comparisons with isinstance() callsJeremy Hylton2001-08-111-9/+9
|
* Whitespace normalization.Tim Peters2001-08-091-1/+1
|
* Fix SF bug [ #447370 ] typo in urllib2.pyJeremy Hylton2001-08-071-7/+9
| | | | | | | | | Also fix another bug caught by pychecker-- HTTPError() raised when redirect limit exceed did not pass an fp object. Had to change method to keep fp object around until it's certain that the error won't be raised. Remove useless line in do_proxy().
* Patch #444359: Remove unused imports.Martin v. Löwis2001-08-021-1/+0
|
* Only write out one blank line before the request data.Fred Drake2001-07-041-1/+1
| | | | This closes SF patch #419459.
* Raise useful exception when called with URL for which request typeJeremy Hylton2001-05-091-1/+2
| | | | | | cannot be determined. Pseudo-fix for SF bug #420724
* Fix typo (missing "req." prefix on error_302_dict) found by NeilGuido van Rossum2001-04-151-1/+2
| | | | Norwitz's PyChecker.
* Idiotic braino caused HTTP openers to ignore proxies.Moshe Zadka2001-04-111-1/+1
| | | | This fixes 413135
* * Fixing the password-proxy bugMoshe Zadka2001-03-201-7/+8
| | | | * Not sending content-type and content-length twice
* Whitespace normalization.Tim Peters2001-03-161-2/+2
|
* Checking in patch 404826 -- urllib2 enhancements and documentations.Moshe Zadka2001-03-011-48/+115
| | | | | (please not that the library reference does *not* include the urllib2 documnetation -- that will wiat for Fred)
* String method conversion.Eric S. Raymond2001-02-091-17/+16
|
* Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters2001-01-151-30/+30
|
* two fixes for redirects:Jeremy Hylton2000-10-121-24/+31
| | | | | | | | | | | | | | | - don't close the fp, since that appears to also close the socket - join the original url with the redirect reponse to deal with relative redirect URL wrap two socket ops in try/except to turn them into URLErrors, so that client code need only catch one exception. in HTTPError.__del__ only close fp if fp is not None style changes: - use f(*args) instead of apply(f, args) - use __super_init instead of super.__init__(self, ...)
* 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 ;)
* typos fixed by Rob HooftJeremy Hylton2000-06-281-1/+1
|
* Untabify to pass the -tt test.Fred Drake2000-02-101-383/+383
|
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-041-1/+1
| | | | | | | | 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.
* EXPERIMENTALJeremy Hylton2000-01-201-0/+1063
An extensible library for opening URLs using a variety protocols. Intended as a replacement for urllib.