summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix autodoc and intersphinx links in documentation (#1966)Seth Michael Larson2020-09-1810-86/+113
|
* Include filepost.pyi and util/url.pyi (#1955)Ezzeri Esa2020-09-153-0/+48
|
* Mark master branch as 1.26.0.dev0 for RTDSeth Michael Larson2020-09-111-1/+1
|
* Swallow BrokenPipeError when writing request bodyRober Morales-Chaparro2020-09-112-4/+32
| | | | | | | | | | | | | In the case the server legitimately closes a connection but we are still sending data (e.g. sending a POST request), the old code prevents the response to be retrieved. With this change, we avoid a broken pipe in the request write process to be able to capture the HTTP response. Co-authored-by: Rober Morales-Chaparro <rober.morales@gmail.com> Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com> Co-authored-by: hodbn <hodbn@users.noreply.github.com> Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>
* Remove duplicate dict key and except blockhodbn2020-09-092-9/+1
|
* Overhaul and re-theme documentationSeth Michael Larson2020-09-087-42/+54
|
* Include exceptions.pyi and fields.pyiEzzeri Esa2020-09-035-0/+83
|
* Don't log defect warnings on multipart/* responsesBrian Price2020-09-031-0/+20
| | | httplib expects the response body to be available to the HTTP header parser but that's not the case for `parse_headers()` so the following defects are always added to multipart/* responses. We simply ignore these defects at this stage as they are a known issue.
* Remove 'Defensive' from non-timeout SSLError branchSeth Michael Larson2020-08-311-1/+1
|
* Wrap BaseSSLError into SSLError during response readsSeth Michael Larson2020-08-311-3/+3
|
* Coerce values to str in HTTPHeaderDict.__getitem__Hasan Ramezani2020-08-301-2/+2
|
* Always assume UTC if no timezone in Retry-Afterhodbn2020-08-261-0/+7
|
* Blacken using black==20.8b1hodbn2020-08-267-22/+24
|
* Don't raise SNI warning on SecureTransport with server_hostname=Nonehodbn2020-08-231-9/+12
|
* Use tz-aware functions in Retry.parse_retry_after()Seth Michael Larson2020-08-231-2/+2
|
* Include mypy in noxfile and add ssl_match_hostname stubsEzzeri Esa2020-08-213-2/+17
|
* Add SSLTransport to support TLS in TLS connectionsJorge2020-08-191-0/+197
| | | | | | | | | | | | | TLS within TLS is not supported easily within the ssl library. The SSLSocket actually takes over the existing socket (https://github.com/python/cpython/blob/master/Lib/ssl.py#L999-L1006) instead of wrapping it entirely. The only way to support to TLS within TLS is with the wrap_bio methods. This commit introduces SSLTransport which wraps a socket in TLS using the provided SSL context. Rather than taking over the socket it uses the wrap_bio methods to perform TLS on top of that socket. Signed-off-by: Jorge Lopez Silva <jalopezsilva@gmail.com>
* 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
|