| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must
be the timezone string).
|
| |
|
|
|
|
| |
to unix-style).
|
|
|
|
| |
Thanks Andrew Gaul.
|
|
|
|
|
|
|
| |
Test suites for urllib and urlparse run with each other's function to verify
correctness of replacement and both test suites pass.
Bumped urllib's __version__ attribute up a minor number.
|
|
|
|
| |
From SF patch #852334.
|
|
|
|
| |
calls .putheader() wrongly. Reported by Steffen Ries.
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
(contributed by John J Lee)
|
| |
|
|
|
|
| |
Contributed by Brett Cannon.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #607789, bugfix candidate.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Weinberg). This changes all uses of deprecated tempfile functions to
the recommended ones.
|
|
|
|
| |
since the URLopener base class does and **kwargs are used in urlopen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
When os.stat() for a file raises OSError, turn it into IOError per
documentation.
Bugfix candidate.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
that it works.
Bugfix candidate (this and the previous checkin, obviously).
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
and remove the unneccessary "import stat" statement.
|
|
|
|
| |
exists.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
| |
reported by Neal Norwitz.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ftp urls.
|
| |
|
| |
|
|
|
|
| |
Look specific to Windows. Don't know whether it works.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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']
|
|
|
|
| |
This closes SF patch #419459.
|
|
|
|
| |
Reported by Juan M. Bello Rivas.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
giving it a slight facelift
|
| |
|
|
|
|
| |
an invalid 401 request is being handled.
|
|
|
|
|
|
| |
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).
|