Commit Graph

410 Commits

Author SHA1 Message Date
Hussain 0d7de50dbd Just lstrip instead of strip because trailing whitespace already works. 2016-11-16 23:26:48 +05:30
Hussain 248d3e9f0f Fixed issue #3696. Added a test for it as well. 2016-11-16 22:48:45 +05:30
Nate Prewitt 973a7b1cd0 test responses fail with incomplete body reads 2016-11-15 11:24:51 -07:00
Nate Prewitt cfd898fb93 adding method to url tests 2016-11-15 11:19:30 -07:00
Nate Prewitt 5bb01fbfe8 adding method to url tests 2016-11-15 10:46:10 -07:00
Cory Benfield 7f88aca8f7 Merge branch 'master' into proposed/3.0.0 2016-11-15 17:16:04 +00:00
Cory Benfield 2d211d59a0 Fix tests for new urllib3 exception text. 2016-11-15 10:22:38 +00:00
Cory Benfield d24da4a953 Merge pull request #3489 from nateprewitt/1558_pickling_prepared_request
adding in pickling tests for PreparedRequest
2016-11-10 17:26:47 +00:00
Nate Prewitt 340902153f updating pickling tests for PreparedRequest 2016-11-04 10:56:13 -06:00
Cory Benfield f72684e13c Merge pull request #3655 from nateprewitt/tzickel_post_redirect_w_streamable
Rewind readable body before POST redirect
2016-11-03 10:31:04 +00:00
Nate Prewitt 522d37c959 update 307 tests to check body content 2016-11-02 12:04:44 -06:00
tzickel 38dd089c5f Test case for requests getting stuck on post redirect with seekable stream 2016-11-02 12:03:19 -06:00
Nate Prewitt 9849c27b70 test _body_position and rewind_body 2016-11-02 10:12:22 -06:00
Nate Prewitt 40402cd0dd adding rewind for re-POST bodies 2016-11-02 09:56:56 -06:00
Pawel Miech c97a530638 [httpAdapter] allow empty password in proxy credentials
fixes #3659
2016-10-31 14:42:01 +01:00
Cory Benfield 595a409a18 Merge pull request #3627 from nateprewitt/remove_update_call
remove RequestsCookieJar specific update call
2016-10-27 20:53:18 +01:00
Nate Prewitt 390a499e81 test different CookieJar types for add_dict_to_cookiejar 2016-10-27 13:22:45 -06:00
Philipp Konrad 548a03acef requests.post checked data parameters for type like dict.
Changed the type check to Mapping.
2016-10-27 17:57:09 +02:00
Jeremy Cline 35bdfc78c9 Keep `verify` setting when no CA_BUNDLE variable exists
If the ``trust_env`` flag is set on a session and ``verify`` is ``True``
or ``None``, the environment is checked for ``CURL_CA_BUNDLE`` and
``REQUESTS_CA_BUNDLE``. Before this patch, if neither existed,
``verify`` would always be set to ``None`` rather than ``True`` even if
it was originally ``True``.

Signed-off-by: Jeremy Cline <jeremy@jcline.org>
2016-10-24 20:32:12 -04:00
Cory Benfield 50486cf2be Merge pull request #3620 from Lukasa/better-idna
Better support for internationalized domain names.
2016-10-21 13:09:04 +01:00
lovedboy d587533446 little modification in consume_socket_content 2016-10-21 16:55:58 +08:00
Mohamed Elawadi f5b5c293b9 fix issue when the file-like object raises an IOError with tell 2016-10-18 11:09:25 +02:00
Cory Benfield 8dd51d22fc Enable UTS46 mode. 2016-10-14 15:13:37 +01:00
Cory Benfield 9337b4d95d Basic tests for internationalized domain names. 2016-10-14 10:53:15 +01:00
Cory Benfield 49b69b57db Various packaging requirements for idna 2016-10-14 10:21:24 +01:00
Ian Cordasco 5a41febce2 Merge pull request #3109 from jeremycline/use-pool-keys-by-scheme
HTTPAdapter now updates its PoolManager connection_pool_kw
2016-09-29 15:30:31 -05:00
Brian Bamsch 5c15fffaca Rework Bytestring Host Test to use PyTest Httpbin 2016-09-28 20:48:27 -07:00
Brian Bamsch b28531f4bb Add test for request when Host header is bytestring
Request should successfully set cookie in response, fail if cookie fails
to set as will occur in current state when cookie set tries lookup of
domain
2016-09-25 22:10:57 -07:00
Cory Benfield 439451c3d4 Merge pull request #3591 from nateprewitt/3579_cookie_merge
Fix RequestsCookieJar specific update call
2016-09-23 10:32:51 +01:00
Nate Prewitt 31b35ab838 removing redundant logic from prepare_content_length 2016-09-21 16:37:28 -06:00
Nate Prewitt 08a158f486 converting update call to merge_cookies call for cookielib compatibility 2016-09-20 12:20:00 -06:00
Nate Prewitt 563d6572f3 reverting 3357 and comparing properly encoded strings 2016-09-20 10:21:14 -06:00
Ian Cordasco ddf7df9b00 Merge pull request #3576 from nateprewitt/3557_revert_and_fix_encoding
Fix encoding issue in test_response_reason_unicode_fallback
2016-09-20 09:48:40 -05:00
Michael Hunsinger 55e511dd10 Parametrized decode response tests 2016-09-15 21:25:23 -06:00
Michael Hunsinger 713f56ea53 Decode response requires encoding to be set 2016-09-14 20:58:36 -06:00
Cory Benfield 5524472cc7 Merge pull request #3535 from nateprewitt/3339_avoid_getvalues
avoid use of getvalues in super_len
2016-09-14 08:10:28 +01:00
Nate Prewitt 39e8c0d96f reverting 3357 and comparing properly encoded strings 2016-09-13 22:51:28 -06:00
Jeremy Cline 3d2b337906 HTTPAdapter now updates its PoolManager connection_pool_kw
With the addition of https://github.com/shazow/urllib3/pull/830 requests
should update the connection_pool_kw on the PoolManager so that new
ConnectionPools get created when TLS/SSL settings change. This ensures
that users can update the CA certificates used to verify servers as well
as the client certificate and key it uses to authenticate with servers.

This fixes issue #2863
2016-09-06 11:11:59 -04:00
Ian Cordasco 42d4eaf6ea Fix how we test fallback to latin-1 reason encoding
This was terribly broken and found while merging master into proposed/3.0.0
2016-09-06 09:55:37 -05:00
Ian Cordasco b2f6173a38 Merge remote-tracking branch 'upstream/master' into proposed/3.0.0
Conflicts:
   requests/__init__.py
   requests/sessions.py
   tests/test_requests.py
2016-09-06 09:46:02 -05:00
Nate Prewitt cd056cd621 adding ISO-8859-1 fallback for reason decoding 2016-09-02 11:37:48 -06:00
Nate Prewitt f5c59743e7 adding tests for super_len conditional flow 2016-08-25 16:56:01 -06:00
Michael Hunsinger 7c80222afa Fixed another scheme proxy over "all" priority 2016-08-22 21:01:13 -06:00
Nate Prewitt 715830fe21 removing incorrect param from resolve_redirects call 2016-08-22 10:47:17 -06:00
Michael Hunsinger 77b068bb9e Fixed bug to give scheme proxy priority over "all" 2016-08-21 10:59:33 -06:00
Keyan Pishdadian 647ed5b6de Add pickle test with hooks 2016-08-19 14:38:33 -06:00
Keyan Pishdadian 117813ee2e Add prepared request pickling tests 2016-08-19 14:37:26 -06:00
Cory Benfield d3567aacc9 Merge pull request #3510 from nateprewitt/add_close_passthrough
adding passthrough in close() for non-urllib3-like Responses
2016-08-18 09:28:20 +01:00
Nate Prewitt 59f12c9669 adding passthrough in close() for non-urllib3-like Responses 2016-08-12 10:54:41 -06:00
Nate Prewitt 4d5091c287 building Response manually 2016-08-11 14:54:26 -06:00