summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Document how to customize SNI and Host headers when connecting via IPStephen Rosen2020-08-101-0/+5
|
* Add hardcoded paths to macOS frameworks for Big Sur compatibility. (#1905)Shea Craig2020-07-191-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add hardcoded paths to macOS frameworks for Big Sur compatibility. ctypes.util.find_library is checking for the presence of the framework files, which will fail due to macOS Big Sur's "dynamic linker cache". Since these files really can't be anywhere else, we just hardcode the path and load them. See: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes (relevent excerpt provided below) This update takes the approach of leaving the existing behavior as is for macOS 10.8 (lowest supported version) through 10.15. Allegedly Apple is going to number Big Sur as macOS 11, although right now the beta returns a version of "10.16", so this code handles both as being greater than or equal to "10.16". | New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286) * Raise an OSError if not on macOS and trying to import securetransport * Just use hardcoded paths for Security and CoreFoundation libs. This should never be anything but these paths. Instead of checking for `os.path.isfile` with `ctypes.util.find_library`, we just try to load with `ctypes.CDLL` and catch the `OSError` if it fails, add context, and reraise. * Updated to preserve pre-10.16 behavior. * Bail early on non-macOS. * Restore find_library import, OSError -> ImportError * ImportError * OSError * Delete test_securetransport_big_sur.py Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
* Collapse request chunked data and framing into one send() call (#1906)Seth Michael Larson2020-07-161-4/+5
|
* Send "http/1.1" ALPN extension during TLS handshakehodbn2020-07-166-0/+96
|
* Add default user agent header (#1750)DonaCthulhuote2020-06-303-2/+24
| | | Co-authored-by: hodbn <hodbn@users.noreply.github.com>
* Raise a meaningful error for an unknown scheme (#1872)hodbn2020-06-302-2/+15
|
* Feature/support env var sslkeylogfile (#1867)Bastiaan Bakker2020-06-111-0/+7
|
* Remove unnecessary httplib exporthodbn2020-06-101-1/+0
|
* Fix coverage, InvalidChunkLength is chunked and has no expected lengthhodbn2020-06-091-6/+1
|
* Add InvalidChunkLength errorhodbn2020-06-092-2/+25
|
* Fix linting for flake8 v3.8Quentin Pradet2020-05-121-2/+2
|
* Don't insert 'None' into ConnectionPool if it was emptyhodbn2020-04-281-3/+5
|
* Add 'other errors' counter to Retry (#1824)hodbn2020-04-271-3/+31
|
* doco: Fix small typos (#1860)Tim Gates2020-04-202-2/+2
|
* Add CODEOWNERS restricting access to files related to deployment (#1857)Seth Michael Larson2020-04-192-1/+4
|
* Avoid hasattr in BrotliDecoder.decompress()David Vo2020-04-191-4/+3
|
* Backslash terminates authority URL sectionhodbn2020-04-081-1/+1
|
* Unwrap ProxyError when evaluating retries (#1830)hodbn2020-04-032-1/+7
|
* Drain connection after PoolManager redirect (#1817)Chris2020-04-033-27/+20
|
* Stop skipping SecureTransport testsQuentin Pradet2020-03-301-0/+5
|
* Test that ConnectionPool preserves path dot segmentshodbn2020-03-251-0/+5
|
* Ensure load_verify_locations raises SSLError for all backends (#1812)Quentin Pradet2020-03-161-3/+6
| | | | | | | | | | | | | | | | | | | | * Ensure load_verify_locations raises SSLError for all backends This also adds TestSSL to the classes tested in SecureTransport and PyOpenSSL, since: 1. TestSSL was the most natural place for this test. 2. The test only makes sense when run against all SSL backends. Co-authored-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr> * Remove redundant check in test pytest.raises() already checks this. * Update test_socketlevel.py Co-authored-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr> Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
* Add support for HTTPS connections to proxies. (#1679)Jorge2020-03-124-21/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support to talk HTTPS to proxies. Currently there's no way to validate identify for the proxy you might be connecting. Proxies supporting HTTPS endpoints are becoming more common and we need to extend the support for them. When an HTTPS proxy is provided, instead of doing the HTTP CONNECT, we'll forward any requests directly to the proxy and ultimately to the destination. * Fix proxy_headers missing on HTTPS proxy connections. * blackfmt missing files. * Prevent usage of HTTPS proxies when fetching HTTPS resources. - Will be supported by default when we can do TLS within TLS. * Update proxy documentation with more information. * Renamed flag for HTTPS websites through HTTPS proxies. * Added myself to contributors. * Documentation and contributors fixes. * Removed mention that TLS in TLS is being developed as requested. * Space in between my name and the github page. * Add flag to enable HTTPS proxy support. Now that we're adding support for HTTPS proxies we want to avoid a breaking change with clients that had an improper proxy configuration. For now, we're adding a warning an defaulting to the previous behavior. In the future we'll change the behavior to enable HTTPS proxies by default. * Remove guard flag, error out on HTTPS/HTTPS. As requested in the last revision for the PR: - Removed the _enable_https_proxies flag. Instead the feature will be enabled and will error out on invalid configurations. (HTTPS + HTTPS) - Other comments: rename a method, parentheses to clarify order of operations.
* Rename VerifiedHTTPSConnection to HTTPSConnection (#1805)kobayashi2020-02-281-20/+10
|
* Allow the CA certificate data to be passed as a string (#1804)Benno Rice2020-02-222-3/+15
|
* Raise ValueError if method contains control characters (#1800)Seth Michael Larson2020-02-171-0/+14
|
* Add __repr__ to Timeout (#1795)John Vandenberg2020-02-041-1/+4
|
* Release 1.25.8 (#1788)1.25.8Seth Michael Larson2020-01-211-1/+1
|
* Optimize _encode_invalid_chars (#1787)Quentin Pradet2020-01-211-9/+6
| | | | Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
* Empty responses should have no lines.Benjamin Peterson2020-01-141-1/+1
| | | | Previously, iterating the lines of an empty response would yield the empty string once. However, the iterator should instead never yield anything. This is consistent with file io; `open('/dev/null', 'rb').readlines()` is `[]`.
* Document actual default value for resolve_cert_reqs() (#1767)Dominique Martinet2019-12-031-1/+1
|
* Revert behavior to is_appengine=False in testbed (#1760)Zev Goldstein2019-11-271-7/+7
| | | | | | Whether testbed tests "are appengine" is debatable, but historically this function has returned False in testbed tests. This behavior was inadvertently (and unnecessarily) changed in PR #1704. This commit undoes that regression for testbed tests.
* Add hostname to insecure connection warning. (#1691)Steltek2019-11-221-2/+2
|
* Remove unused HTTPSConnection.connect()Quentin Pradet2019-11-211-34/+0
| | | | Unverified connections also go through VerifiedHTTPSConnection.
* Assume that _encode_target urls start with slashQuentin Pradet2019-11-211-3/+0
| | | | | Indeed, the only _encode_target only calls it if the url starts with a slash.
* Release 1.25.7 (#1745)1.25.7Seth Michael Larson2019-11-111-1/+1
|
* Preserve chunked parameter on broken connections and redirects (#1734)Quentin Pradet2019-11-071-0/+2
|
* Don't encode fragment into target (#1732)Seth Michael Larson2019-11-041-5/+2
| | | | | | * Don't encode fragment into target * Add entry in CHANGES.rst
* Update urllib3/requests GitHub URLs (#1719)Quentin Pradet2019-10-293-3/+3
|
* Preserve chunked argument in urlopen() retry (#1715)lmvlmv2019-10-291-0/+1
|
* Don't rely on SERVER_SOFTWARE being set for AppEngine (#1704)Zev Goldstein2019-10-182-17/+14
|
* Remove TLS 1.3 support in SecureTransport (#1703)Quentin Pradet2019-10-042-15/+5
| | | | | It's not actually supported by the OS. In other words, instead of trying TLS 1.3 and being forced to fallback on TLS 1.2, we just use TLS 1.2 by default.
* Merge strings that fit on a single line (#1700)Quentin Pradet2019-09-277-18/+11
|
* Release 1.25.6 (#1693)1.25.6Seth Michael Larson2019-09-241-1/+1
|
* Don't percent encode tilde character (#1692)Seth Michael Larson2019-09-241-6/+7
|
* Release 1.25.5 (#1685)1.25.5Seth Michael Larson2019-09-192-3/+8
|
* Release 1.25.4 (#1681)1.25.4Seth Michael Larson2019-09-191-1/+1
|
* Percent-encode targets and URLs in ConnectionPool (#1673)Seth Michael Larson2019-09-192-1/+30
|
* Fix for Python 4 (#1669)Hugo van Kemenade2019-08-254-5/+5
|
* Enable TLS 1.3 post-handshake authentication (#1635)Christian Heimes2019-08-161-0/+7
| | | | | | | | | | Fixes: https://github.com/urllib3/urllib3/issues/1634 Signed-off-by: Christian Heimes <christian@python.org> * Add tests for TLS 1.3 PHA Fixes: https://github.com/urllib3/urllib3/issues/1634 Signed-off-by: Christian Heimes <christian@python.org>