Commit Graph

125 Commits

Author SHA1 Message Date
Carson Lam a02069ec9e Remove int type on max_retries argument. 2016-01-29 15:30:22 -08: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
kennethreitz 1601387cbe Merge pull request #2308 from kevinburke/read-timeout-retry
Note about read timeout errors and max_retries
2014-11-12 12:35:24 -05:00
Cory Benfield f28bde7250 Pass strict to urllib3. 2014-11-07 09:19:18 +01:00
Kevin Burke a703e24573 Update documentation about max_retries to reflect code 2014-10-27 09:56:18 -07:00
Thomas Weißschuh cd5eb62961 remove unused import 2014-09-26 22:28:29 +00:00
Thomas Weißschuh 6e1db21733 fix #2247
We have to pass urllib3 the url without the authentication information,
else it will be parsed by httplib as a netloc and included in the request line
and Host header
2014-09-25 19:49:28 +00:00
kennethreitz 1324ca1a0f Merge pull request #2193 from sigmavirus24/bug/2192
Capture and re-raise urllib3 ProtocolError
2014-09-04 11:39:41 -07:00
Ian Cordasco 9354855648 Consolidate error handling 2014-09-03 16:01:25 -05:00
Ian Cordasco da122231e4 Capture and re-raise urllib3 ProtocolError 2014-08-29 15:16:30 -05:00
Kevin Burke dfa41afd43 Document Timeout behaviour 2014-08-29 11:50:11 -07:00
Kevin Burke c2aeaa3959 Add support for connect timeouts
Modifies the timeout interface to also accept a tuple (connect, read) which
would be used to set individual connect and read timeouts for Requests. Adds
Advanced documentation explaining the interface and providing guidance for
timeout values.
2014-08-23 15:12:29 -07:00
kennethreitz fe693c4922 Merge pull request #2142 from sigmavirus24/urllib3-1.9
Upgrade urllib3 to 1.9.x
2014-07-22 16:21:05 -04:00
Ian Cordasco 170d6269eb Fix test bug courtesy of @shazow 2014-07-21 15:00:14 -05:00
Ben Bass 046302c0cb indentation change for code review 2014-06-08 15:23:37 +01:00
Ben Bass 54e96b40b7 allow pool_kwargs to be specified in init_poolmanager 2014-05-18 20:24:35 +01:00
Ben Bass 02618c8df5 improve proxy_manager_for re-usability by subclass 2014-05-18 20:10:35 +01:00
Ben Bass f97e78726e Factor out HTTPAdapter.proxy_manager_for for #2048 2014-05-17 23:15:51 +01:00
schlamar 59c8d81381 Read content in Session.send instead of Adapter.send. 2014-05-12 22:42:54 +02:00
kennethreitz c023f06aad Merge pull request #1924 from schlamar/proxy-default-scheme
Default proxy scheme to HTTP
2014-05-12 15:05:56 -04:00
cjstapleton 930f03c864 Add timeout to stream with testing
Fixes Issue #1803
2014-02-28 10:08:57 -06:00
schlamar 4404e7e328 Default proxy scheme to http. 2014-02-18 15:24:24 +01:00
schlamar 780ce3902e Revert "Proxy urls should have explicit schemes."
This reverts commit 840540b6b1.

Conflicts:
	requests/adapters.py
	requests/utils.py
2014-02-18 15:15:36 +01:00
Ian Cordasco 27eb54a20a Move creation of attributes to RequestException
Pass request objects in HTTPAdapter
2014-01-28 20:13:57 -06:00
Cory Benfield 5b4e9aff0e Don't need to unquote twice. 2014-01-12 14:46:40 +00:00
Kenneth Reitz df1c2335c8 Merge branch 'master' into fix-pickling-adapters
Conflicts:
	AUTHORS.rst
2014-01-08 13:53:23 -05:00
kennethreitz a855ba8189 Merge pull request #1827 from pepijndevos/master
Use adapter pool size for proxies
2014-01-08 10:50:00 -08:00
Kevin Burke a0e7706440 Fix warnings when building the docs
It may be nice to make builds fail if new documentation generates warnings, to
avoid these sorts of problems slipping in in the future.
2013-12-28 00:09:29 -08:00