Jonathan Elliott Blum
8e040523a4
pass kwargs from send call to add_headers, per documentation
2018-02-02 13:10:16 -05:00
Nehal J Wani
9a8a826f22
Check if host is invalid for proxy
...
According to RFC3986, the authority section can be empty for a given URL,
however, for a proxy URL, it shouldn't be. This patch adds a check to verify
that the parsed URL will have a valid host before creating the proxy manager.
Fixes #4353
2017-11-15 08:58:54 -05:00
Arthur Vigil
c86b09b3c6
support extraction of certificate bundle from a zip archive
2017-11-05 12:14:17 -08:00
Cory Benfield
4f49f6b3ed
Correctly raise SSLError from urllib3.
2017-07-29 12:12:11 +01:00
kennethreitz
c49ce5ae0b
fix
2017-05-26 22:56:43 -04:00
kennethreitz
168109f13c
fix adapters.py
2017-05-26 22:52:29 -04:00
Jonas Laursen
00c6ad58b7
Simplify fix for #4025
2017-05-18 09:04:34 -07:00
Jonas Laursen
af66521381
Fix #4025
2017-05-18 09:04:34 -07:00
Chris Gavin
19ba9f1097
Remove some unused imports.
2017-04-25 22:10:01 +01:00
Alexander 'Leo' Bergolth
4c13678587
remove change for timeout=None
2017-03-30 16:20:39 +02:00
Alexander 'Leo' Bergolth
1e7ae063ce
whitespace
2017-03-29 18:20:11 +02:00
Alexander 'Leo' Bergolth
fe58c6fdd6
small rearrangement
2017-03-29 18:01:18 +02:00
Alexander 'Leo' Bergolth
a180db963f
allow urllib3 Timeout objects as timeout parameter for HTTPAdapter.send()
...
omit timeout argument when calling urlopen on the connection. this allows setting a default timeout at connection pool level:
adapter.poolmanager.connection_pool_kw['timeout'] = urllib3.Timeout(...)
2017-03-29 16:53:28 +02:00
Bastien Gérard
4207867aaf
PR review fixes:
...
- used httpbin_secure for tests
- updated docstring related to `verify` param"
- used TLS acronym instead of SSL
2017-03-22 21:28:38 +01:00
Bastien Gérard
42ec8b08f2
#3927 fixes based on review
2017-03-22 21:28:38 +01:00
Bastien Gérard
7d8b87c37f
#3926 raise IOError when providing an invalid path to a CA bundle or certificate files
2017-03-22 21:28:38 +01:00
Pawel Miech
c97a530638
[httpAdapter] allow empty password in proxy credentials
...
fixes #3659
2016-10-31 14:42:01 +01:00
Ville Skyttä
542fbbc67f
Document bunch of return types
2016-08-09 13:32:56 +03:00
Seppo Yli-Olli
9e9d2c6521
Make BaseAdapter describe the mandatory adapter interface ( #3216 )
...
* BaseAdapter definition of send is missing mandatory params
* Copy over relevant parts of the interface documentation
* Indentation fix
* Change base class documentation for close
2016-05-24 13:23:16 -05:00
kennethreitz
39d6935488
Merge pull request #2953 from Lukasa/socks_proxy_support
...
SOCKS Proxy Support
2016-04-29 18:03:04 -04:00
Matt Dainty
2029a8a931
Clear any pooled proxy connections
...
As well as clearing any pooled direct connections, iterate over any
ProxyManager objects and clear any pooled proxy connections there as well.
2016-04-15 09:33:37 +01:00
Alexander Shchapov
6ca9d71bb5
Raise a ProxyError for proxy related connection issues.
2016-03-17 15:46:26 -04:00
Carson Lam
a02069ec9e
Remove int type on max_retries argument.
2016-01-29 15:30:22 -08:00
Cory Benfield
e4d15c4649
Help @sigmavirus24 with code golf.
2015-12-30 16:45:51 +00:00
Cory Benfield
11b9b24ac9
Some code cleanups.
2015-12-30 14:37:53 +00:00
Cory Benfield
1c54014daf
Don't parse nonexistent URLs.
2015-12-30 10:48:29 +00:00
Cory Benfield
08364c6739
Add support for SOCKS
2015-12-30 10:40:24 +00:00
Olle Lundberg
68db4132e3
Update adapters.py
...
Remove duplicate word.
2015-11-25 02:02:41 +01:00
Ian Cordasco
35170e180e
Merge pull request #2858 from Lukasa/support_ca_cert_directories
...
Add support for a directory of CAs
2015-11-07 15:39:41 -06:00
Cory Benfield
e67cd15bc8
Fix breakage introduced by 8f591682
2015-11-05 18:54:40 +00:00
Cory Benfield
0352ec0bd3
Add support for a directory of CAs
2015-11-05 13:21:21 +00:00
Dimitris Bliablias
8f591682e6
Use buffering for HTTP responses on chunked requests
...
For non-chunked requests, the request is performed using the 'urlopen'
method that underlying uses buffering for the HTTP responses (for Python
2.7+ versions). For chunked requests though, the request is made via a
different code path and so the 'getresponse' method is called without
using buffering. So, the response is consumed per single byte via a
recv() call on the underlying socket.
This patch, fixes that issue to mimic the non-chucked request behavior.
2015-10-15 16:58:07 +03:00
Cory Benfield
f7be4e5f28
NewConnectionErrors aren't timeouts.
...
This is a compatibility change, and should be removed in 2.8.0
2015-10-08 14:05:17 +01:00
Cory Benfield
8963e1567b
Merge pull request #2678 from sigmavirus24/proposed/2.8.0
...
Proposed 2.8.0
2015-10-05 15:09:41 +01:00
Jason Grout
4c6540898c
don't lowercase a url before urlparsing it
...
urlparse automatically lowercases the scheme and hostname
2015-08-28 20:20:07 +00:00
Jason Grout
f3d4480a33
Use url parsing to check the scheme
2015-08-28 20:06:45 +00:00
Jason Grout
c80121df91
Fix documentation for the proxies dictionary
2015-08-27 18:21:04 +00:00
Jason Grout
500f15da1f
Factor out the proxy selection code
2015-08-27 18:21:04 +00:00
Jason Grout
d7a3aa6188
Fix another place the proxy-selecting logic is used.
2015-08-27 17:26:14 +00:00
Jason Grout
22075f02d0
Clarify the per-host proxy code
2015-08-25 18:21:20 +00:00
Jason Grout
48fe34447d
Implement per-host proxies
...
This change allows the proxy dict to be have entries of the form
{'<scheme>://<hostname>': '<proxy>'}. Host-specific proxies will be used in
preference to the scheme-specific proxies (i.e., proxy dict entries with keys
like 'http' or 'https').
Fixes #2722
2015-08-24 21:16:35 +00:00
qingyunha
9d88810d52
modify proxy_headers docstrings
2015-08-24 19:48:17 +08:00
Lukas Graf
f40bd0f707
Docs: Fix links to timeouts section by using :ref: instead of
...
linking to .html files.
2015-08-15 12:03:05 +02:00
Susan Tan
5ec7576f23
Catch and wrap ClosedPoolError
...
Partially resolves #1572 : "urllib3 exceptions passing through requests
API".
Inspired from Lukasa's 2605be11d82d42438ac7c3993810c955bde74cef.
2015-07-17 01:30:51 -07:00
Cory Benfield
e9a1e35f89
Only pass useful timeouts to _get_conn
2015-07-03 17:00:38 +01:00
Cory Benfield
2e62df456a
Avoid double releasing chunked upload connections
...
Resolves #2636
2015-06-13 08:10:53 +01:00
Ian Cordasco
c4bd6ea150
Import urllib3's Retry location from the right place
...
Importing from urllib3's top-level location causes the namespace to be
urllib3.util.retry.Retry instead of
requests.packages.urllib3.util.retry.Retry. Without this fix, an using
requests with an un-vendored version of urllib3 will break when urllib3's
retry handling kicks in.
Closes shazow/urllib3#567
2015-03-11 20:52:12 -05:00
Ian Cordasco
adf475ef82
Update HTTPAdapter docstring
2014-11-12 13:58:03 -06:00
Ian Cordasco
2eb7e3c80b
Add last few changes and add a quick test
2014-11-12 13:56:28 -06:00
Ian Cordasco
2bc7762cb6
Update how we handle retries to be consistent with documentation
2014-11-12 13:56:28 -06:00