| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | | |
|
| | | |
|
| | |\ |
|
| | | | |
|
| | |/
| |
| |
| |
| | |
This commit follows a discussion on IRC. For more information, see the
Pull Request associated with it.
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
get_encodings_from_content() can now detect HTML in-document content
encoding declarations in the following formats:
- HTML5
- HTML4
- XHTML 1.x served with text/html MIME type
- XHTML 1.x served as XML
Ref: http://www.w3.org/International/questions/qa-html-encoding-declarations
|
| | |
|
| |
|
| |
This has the added benefit of including proxies defined by the OS X System Configuration framework and in the Windows registry, rather than only checking os.environ.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #649 and #1329 by making Session.headers a CaseInsensitiveDict,
and fixing the implementation of CID. Credit for the brilliant idea
to map `lowercased_key -> (cased_key, mapped_value)` goes to
@gazpachoking, thanks a bunch.
Changes from original implementation of CaseInsensitiveDict:
1. CID is rewritten as a subclass of `collections.MutableMapping`.
2. CID remembers the case of the last-set key, but `__setitem__`
and `__delitem__` will handle keys without respect to case.
3. CID returns the key case as remembered for the `keys`, `items`,
and `__iter__` methods.
4. Query operations (`__getitem__` and `__contains__`) are done in
a case-insensitive manner: `cid['foo']` and `cid['FOO']` will
return the same value.
5. The constructor as well as `update` and `__eq__` have undefined
behavior when given multiple keys that have the same `lower()`.
6. The new method `lower_items` is like `iteritems`, but keys are
all lowercased.
7. CID raises `KeyError` for `__getitem__` as normal dicts do. The
old implementation returned
6. The `__repr__` now makes it obvious that it's not a normal dict.
See PR #1333 for the discussions that lead up to this implementation
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Implement RequestsCookieJar.copy
Use RequestsCookieJar.update when merging cookiejars
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
As per #1105, certifi is being end-of-lifed. Requests will use either
its own vendored bundle, or possibly (when packaged with OS distributions)
an externally packaged bundle, which can be enabled by patching
requests.certs.where().
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Mostly removed a whole bunch of unused imports.
|
| | |
|
| | |
|
| |\
| |
| | |
Respect the no_proxy environment variable.
|
| | |
| |
| |
| | |
This change is in response to issue #879.
|
| |\ \
| | |
| | | |
Only return a path if the cacert.pem file exists.
|
| | |/
| |
| |
| |
| |
| | |
This will permit the deletion of just that one file in order
to fall back to the [probably more accurate but less consistent]
Distro provided CA certs.
|
| |/
|
|
| |
Adding a try/except block just masks any issues that are raised here, issues that the developer should definitely be made aware of.
|
| | |
|
| |
|
|
|
|
| |
JSON *must* be encoded using UTF-8, UTF-16 or UTF-32 (see the [RFC][1]; detect the encoding based on the fact that JSON always starts with 2 ASCII characters.
[1]: http://tools.ietf.org/html/rfc4627#section-3
|
| |
|
|
|
|
|
|
| |
compat.py: relevant imports added
utils.py: then those imports are imported here.
Nothing else was changed, but I saw mentions of quoting later in
utils.py but I wasnt sure what to do about that.
|
| |
|
|
| |
Make value of Contents-Encoding header case insensitive per RFC 2616.
|
| | |
|
| | |
|
| |
|
|
|
| |
Use dicts and lists where necessary but accept both dicts and lists of
2-tuples everywhere.
|
| |
|
|
|
|
|
| |
This allows iter_content and iter_lines to succeed without
crashing even after the response content has been fetched
(iter_content gives you an iterator over the prefetched
content)
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
requests/models.py
tests/test_requests.py
Remove some of Lukasa's duplication of my efforts in _encode_data.
|
| | | |
|
| |/
|
|
|
|
|
| |
It uses the same logic whenever we're trying to use a list of key values and
avoid what I had started doing -- using the same pattern everywhere.
proxies, and headers should both be covered by this commit.
|
| | |
|
| | |
|
| |\
| |
| | |
Add openSUSE certificate support
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
| |
https://github.com/kennethreitz/requests/issues/630
|