| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | | |
|
| | |\
| | |
| | |
| | | |
into 2.0
|
| | | | |
|
| | | |
| | |
| | |
| | | |
On 401's the cookies received aren't sent back to the server. See: #1336
|
| | |\ \ |
|
| | | | | |
|
| | | |/
| | |
| | |
| | |
| | | |
This commit follows a discussion on IRC. For more information, see the
Pull Request associated with it.
|
| |\ \ \
| | | |
| | | | |
Fixing error return to be consistent with tuple return at the end of the method
|
| | | | | |
|
| | | |/
| |/| |
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \
| | |
| | |
| | |
| | | |
dpursehouse/rewrite-test_mixed_case_scheme_acceptable
Rewrite test cases to remove dependency on httpbin.org and example.com
|
| | | |
| | |
| | |
| | |
| | | |
Update the test to check that the URL in the response is the
one that we expect, i.e. the one it was supposed to redirect to.
|
| | | |
| | |
| | |
| | |
| | | |
Instead of redirecting to hard-coded 'example.com', use the URL
defined in `HTTPBIN_URL` with the path set to the 'html' endpoint.
|
| | | |
| | |
| | |
| | |
| | | |
This test verifies that an upper case scheme ('HTTP') works correctly,
but this is already tested in `test_mixed_case_scheme_acceptable`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of using hard-coded urls to httpbin.org, use the url defined
in `HTTPBIN_URL` replacing the scheme as necessary to test the mixed
cases.
Refs #1485
|
| | |/ |
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |\
| |
| | |
Fix test cases that fail when running behind a proxy
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
When sending a request via `Session.send()` the proxies must be
explicitly given with the `proxies` argument. This is not done
in the test cases, which means that they fail when run on a system
that is behind a proxy.
Update test cases to make sure the proxies are set in the sessions.
|
| |/
|
|
|
|
|
|
| |
Test cases can be run against a local httpbin server defined by
the `HTTPBIN_URL` environment variable, but it causes tests to
fail if the given URL does not end with a slash.
Ensure that the URL always ends with a slash.
|
| |\
| |
| | |
unquote double-quotes cookie values
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
| |
Here's what should happen:
- If no credentials are given, use netrc if there's a netrc entry.
- If credentials are given, they should override netrc.
|
| | |
|
| | |
|
| |\
| |
| | |
resolve_redirects no longer throws an InvalidSchema exception when the scheme is uppercase
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
lowercase, added tests or the scheme casing
|
| | |
| |
| |
| | |
into urllib3 by lower-ifying them so that the underlying pool manager can effectively pool by scheme as dictionary key
|
| |/
|
|
| |
- added test cases for trying to test GETS on mixed-case schemas
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`PreparedRequest.prepare_url` incorrectly applied IDNA encoding to the
URLs entire `netloc`. It should only be encoding the hostname portion
of the URL. IDNA encoding was limiting the user info, host, and port
segments to be a maximum of 63 characters which causes problems for
all by the most trivial user + password combinations.
- Replaced usage of `urlparse` in `PreparedRequest.prepare_url` with
`urllib3` equivalent.
- Modified IDNA encoding section so that it only encodes the host
portion of the URL.
|
| | |
|
| |
|
|
| |
Requested by @sigmavirus24.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|