420 Commits

Author SHA1 Message Date
kennethreitz 9b8206fdb7 changes 2019-07-20 10:43:27 -04:00
kennethreitz 96f75e7d90 cleanup 2019-07-19 10:12:01 -04:00
kennethreitz 545231b14a cookies 2019-07-19 10:05:20 -04:00
kennethreitz c0a8f3008b preliminary tests working 2019-07-19 09:00:59 -04:00
kennethreitz dec7515c5c fix 2019-04-21 14:58:29 -04:00
kennethreitz 9681f09f8c changes, everywhere 2019-04-21 14:41:38 -04:00
kennethreitz 5a1da4e326 that approach works 2019-04-21 13:04:46 -04:00
kennethreitz 81278dbe51 all of this 2019-04-21 07:35:54 -04:00
kennethreitz b1e69a5ede changes 2019-04-21 06:32:03 -04:00
kennethreitz 91e1b527e9 everything changes 2019-04-20 22:59:49 -04:00
kennethreitz 63e18ff2cc working! 2019-04-19 10:39:50 -04:00
kennethreitz 0e4eb5683b refactor 2019-04-18 15:39:34 -04:00
kennethreitz e14c28a109 merge 2019-04-18 15:15:11 -04:00
Seth M. Larson ad9400ecfe Normalize percent-encoded bytes before comparison 2018-12-23 15:50:16 -06:00
Nate Prewitt ea9436a5d6 proper handling for default ports in auth stripping 2018-10-28 23:29:04 -07:00
Nate Prewitt 7fd9267b3b remove final remnants from 2.6 2018-10-17 00:18:51 -07:00
Hugo Osvaldo Barrera 89ab030cdb Use comprehensions whenever possible 2018-10-16 20:34:22 -07:00
Nate Prewitt bbdbcc8f05 wrap url parsing exceptions from urllib3's PoolManager 2018-09-30 18:36:05 -06:00
Bruce Merry 857e9b7ac2 Rework authorization stripping logic as discussed
The exception for http->https upgrade now requires the standard HTTP(S)
ports to be used, either implicitly (no port specified) or explicitly.
2018-09-14 10:44:43 +02:00
Bruce Merry 3331e2aecd Strip Authorization header whenever root URL changes
Previously the header was stripped only if the hostname changed, but in
an https -> http redirect that can leak the credentials on the wire
(#4716). Based on with RFC 7235 section 2.2, the header is now stripped
if the "canonical root URL" (scheme+authority) has changed, by checking
scheme, hostname and port.
2018-09-14 10:44:43 +02:00
Alex Chan d1fab0b60c Fix a typo in a test docstring 2018-09-13 06:26:59 +01:00
Kale Franz 8023a01dba Fix assumed hostname when using a 'file' URI scheme adapter 2018-08-13 11:28:35 -05:00
Lucy Linder 907c927d60 make content-type's charset information case-insensitive
see issue https://github.com/requests/requests/issues/4748 for more information
2018-07-24 18:13:50 +02:00
Antti Kaihola 691e9520ed Add test for multivalued form-encoded element as a list (#4700) 2018-07-20 10:30:31 +03:00
Steven M. Vascellaro 4d51e6d201 Remove unused httpbin parameters
httpbin is used to mock HTTP endpoints. In these methods, the parameter
goes unused.
2018-07-17 19:39:18 -07:00
Steven M. Vascellaro 28da72b616 Remove unused session variables
Removed local session variables that go unused during testing.
2018-06-26 12:34:15 -04:00
Raymond Hettinger 7e297ed95b Separate collections from collections.abc 2018-06-11 22:14:59 -07:00
Laurent Bachelier 10915e3b0d Add a public method to get the cookie policy 2018-06-11 22:13:07 -07:00
Laurent Bachelier ace0c200f4 Add cookie policy related tests 2018-06-11 22:13:07 -07:00
Rajiv Mayani 8546a15587 The library raises NoneType error when file-pointer (fp) resolves to None.
>>> from requests import post
>>> r = post("https://example.com", files={"file-name": None})

However, when a param value or json field is None they are not included in the request body.

>>> from requests import get
>>> r = get("https://example.com", params={"file-name": None})
>>> r.request.url

This commit makes the beahviour consistent for files.
2018-05-17 13:56:17 -07:00
kennethreitz c6464c1770 /s/requests/requests3 2018-03-16 19:06:08 -04:00
kennethreitz 8f3f022c54 attempt to fix appveyor
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 17:25:00 -04:00
kennethreitz 3951232f8c fix tests
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 17:09:39 -04:00
kennethreitz 86ab1ce916 session fixture
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 17:07:59 -04:00
kennethreitz cac7a2843d white
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 16:33:33 -04:00
kennethreitz b6bc1d06aa passing tests™ 2018-03-15 16:32:16 -04:00
kennethreitz e16fc666af white / improvements
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 14:20:53 -04:00
kennethreitz 5574076b05 __slots__
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 11:01:25 -04:00
kennethreitz 64d85b7ebf use rfc8936 2018-03-15 10:39:26 -04:00
kennethreitz b2e99359fc merge 2018-03-15 08:59:47 -04:00
kennethreitz 8a1baaf47b white 2018-03-15 06:56:20 -04:00
kennethreitz 9cea8ce09d black
https://github.com/ambv/black
2018-03-14 17:28:51 -04:00
kennethreitz 582ce4d247 no cstringio
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 12:13:47 -04:00
kennethreitz f531629a9b remove python2–specific code
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 11:58:21 -04:00
kennethreitz 6be73f90b1 /s/compat/basics 2018-03-12 11:53:12 -04:00
kennethreitz 315a5661e3 new approach
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 11:47:09 -04:00
David Poole 85ec7d759e Merge branch 'master' into master 2018-03-05 09:07:12 -07:00
Jon Dufresne 4c6d9e1954 Remove requests.packages for v3.0.0
As v3.0.0 already includes other backwards incompatible changes, it is a
good time to remove the old entry point for vendored packages. Cleans up
compatibility shims.
2018-02-04 19:07:26 -08:00
Nate Prewitt f60324a3de append previous url fragment on redirect 2018-01-21 09:55:45 -08:00
Darren Dormer 2255c34a65 Fix DNS resolution by using hostname instead of netloc and strip username and password when comparing against proxy bypass items. 2018-01-16 10:18:06 +01:00