summaryrefslogtreecommitdiff
path: root/test/with_dummyserver
Commit message (Collapse)AuthorAgeFilesLines
* Change sub-class of NameResolutionError to NewConnectionErrorQuentin Pradet2021-07-081-2/+2
| | | | | | | This solves various problems: * Adding `NameResolutionError` is no longer a breaking change * Retries are supported again * `ProxyError` is raised again for all proxy related errors
* Raise NameResolutionError instead of socket.gaierror (#2305)euri102021-06-282-10/+17
| | | The new exception still derives from `socket.gaierror`, so this isn't a breaking change.
* Don't emit multiple Transfer-Encoding headers in request_chunked()Vishwas B Sharma2021-06-211-5/+54
|
* Make parameters after method and url keyword-only for urllib3.request()Frederico Lima2021-06-201-0/+5
| | | Co-authored-by: Fred <frederico.lima@ifood.com.br>
* Fix flaky DeprecationWarning testsHasan Ramezani2021-06-191-6/+4
|
* Fix remove_headers_on_redirect feature modifying passed-in headers in-place ↵Ran Benita2021-06-191-1/+5
| | | | | | | | | | | | | (#2272) In general I'd say it's expected in Python that when passing a dict to to an argument like `headers` that it won't be modified in-place and could be reused safely for further requests. Previously the remove_headers_on_redirect feature didn't uphold this. Do a copy to make sure that it does. This commit additionally *avoids* an unneeded copy when the `remove_headers_on_redirect` code isn't reached.
* Add a test for using HTTPHeaderDict with PoolManager(headers) (#2274)Ran Benita2021-06-191-1/+30
|
* Remove python2 compat stuff from test_socketlevel.py (#2276)Ran Benita2021-06-191-36/+22
| | | | | | | * Reformat imports in test_socketlevel.py Make the next commit more understandable. * Remove python2 compat stuff from test_socketlevel.py
* Tolerate the strict parameter being passed via connection_from_context()Hasan Ramezani2021-06-161-0/+35
|
* Added `preload_content`, `retries`, `redirect` and `timeout` arguments to ↵ubdussamad2021-06-161-1/+56
| | | | urllib3.request()
* Fix ssl deprecation warnings in Python 3.10Seth Michael Larson2021-06-071-2/+3
|
* Add type hints to urllib3.poolmanager (#2232)Hasan Ramezani2021-05-311-2/+9
| | | Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
* Add coverage for all raise branchesBastian Venthur2021-05-221-0/+9
|
* Added body parameter to top-level request() and RequestMethods.request()Bastian Venthur2021-05-191-0/+10
|
* Add type hints to connection modulesFranek Magiera2021-04-121-6/+7
|
* Lean on SSLContext to verify hostnames when possible (#2178)Quentin Pradet2021-03-163-4/+9
| | | | | | | | | | | | | | | | | | | | | | | * Use exact same SNI logic in pyOpenSSL and SecureTransport It won't make a difference in practice, and avoids useless differences. * Move "no SNI if IP address" responsibilty to TLS backends * The ssl module already avoids SNI when the host is an IP address * pyOpenSSL now does that too * We were already using SNI on IP addresses with SecureTransport anyway In other words, this does not change anything, but is cleaner (we no longer test for SecureTransport in ssl.py) and will allow us to lean on ssl.SSLContext to match hostnames. * Stop exposing is_ipaddress as a public We already have way too much public functions * Lean on SSLContext to verify hostnames when possible * Address review comments
* Always use our custom ssl.match_hostname() implementationQuentin Pradet2021-03-161-0/+12
| | | Python's implementation still accepts commonName and we don't want that behavior.
* Remove notOpenSSL098 pytest fixtureQuentin Pradet2021-03-121-2/+0
|
* Add exception wrapper for HTTPS proxy connection failure (#2133)Jorge2021-02-091-0/+14
|
* Add top-level request() methodFranek Magiera2021-02-081-0/+6
|
* Use match parameter in pytest.raises()Hasan Ramezani2020-12-293-18/+15
| | | Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
* Remove work-around for missing ipaddress module in Python 2Jon Dufresne2020-12-261-10/+0
|
* Remove fallback on commonName in match_hostname()Hasan Ramezani2020-12-231-29/+11
|
* Improve message for ProxySchemeUnknown exceptionHasan Ramezani2020-12-101-0/+22
|
* Remove deprecated Retry optionsQuentin Pradet2020-11-241-11/+11
|
* Remove six (#2078)Hasan Ramezani2020-11-232-7/+1
|
* Remove Python 2 branches, HTTPHeaderDict.from_httplibHasan Ramezani2020-11-181-2/+1
|
* Remove support for Python 2 and 3.5Hugo van Kemenade2020-11-156-400/+236
| | | | | | | | - Upgrades syntax to Python 3.6+ with f-strings - Removes most usage of six - Removes documentation relevant to Python 2 - Removes universal wheel config - Removes mock dependency for testing
* Don't send 'User-Agent' twice if header is binarySeth Michael Larson2020-11-111-0/+23
|
* Skip TLS versions if disabled by OpenSSL configSeth Michael Larson2020-11-051-8/+4
|
* Terminate connection when custom verification fails (SecureTransport) (#1977)hodbn2020-11-012-12/+57
|
* Add SKIP_HEADER for skipping automatically added headersSeth Michael Larson2020-10-272-8/+142
|
* Deprecate negotiating TLSv1 and TLSv1.1 by defaultSeth Michael Larson2020-10-061-20/+100
|
* Don't set keylog_filename for empty valuesSeth Michael Larson2020-10-041-0/+12
|
* Fix flaky test by avoiding refused connection with short timeout (#2008)Quentin Pradet2020-10-021-2/+2
|
* Sort imports with 'isort'Quentin Pradet2020-10-017-92/+82
|
* Integrate TLS-in-TLS support into urllib3 (#1923)Jorge2020-09-291-11/+90
|
* Consume connections better in socket-level tests (#1958)hodbn2020-09-181-23/+26
| | | Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>
* Use LONG_TIMEOUT on test with disabled retriesQuentin Pradet2020-09-181-1/+1
|
* Swallow BrokenPipeError when writing request bodyRober Morales-Chaparro2020-09-111-0/+45
| | | | | | | | | | | | | 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>
* Use LONG_TIMEOUT on another timeout-based testQuentin Pradet2020-09-091-1/+1
| | | | | While we do have a retry here, it's needed to make two queries, and cannot be wasted on a timeout due to continuous integration being slow.
* Use LONG_TIMEOUT for read with retries=0Quentin Pradet2020-09-081-2/+1
| | | This is done in other tests, and avoids timing out on the initial read
* Skip two tests that are flaky on WindowsQuentin Pradet2020-09-081-0/+3
| | | | | | These tests tend to throw WinError 10053, 10054 and 10061 on Windows, which breaks the continuous integration most of the time. Since we're not testing anything Windows-specific here, it's okay to not run those tests on Windows.
* Don't log defect warnings on multipart/* responsesBrian Price2020-09-031-0/+37
| | | 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.
* Coerce values to str in HTTPHeaderDict.__getitem__Hasan Ramezani2020-08-301-0/+8
|
* Blacken using black==20.8b1hodbn2020-08-262-4/+8
|
* Send "http/1.1" ALPN extension during TLS handshakehodbn2020-07-162-2/+41
|
* Add default user agent header (#1750)DonaCthulhuote2020-06-303-66/+131
| | | Co-authored-by: hodbn <hodbn@users.noreply.github.com>
* Raise a meaningful error for an unknown scheme (#1872)hodbn2020-06-301-1/+24
|
* Fix testing of SSLKEYLOGFILE on AppVeyorhodbn2020-06-242-10/+5
|