Vincent Barbaresi
0380ac5893
add some parametrized tests for iter_lines()
...
Write a list of different chunk splits and their expected results
to test against, using ianepperson's breakdown as specification:
https://github.com/kennethreitz/requests/pull/2431#issuecomment-72333964
2017-03-15 01:37:48 +01:00
Alex Chan
9881be25f3
Review markups for @Lukasa
2017-03-14 16:57:52 +01:00
Ian Epperson
02031e3e14
Test to show bug when delimiter is split between reads
2017-03-14 16:57:52 +01:00
Nate Prewitt
64b66b6409
test prepare_content_length sets expected headers
2017-03-02 05:27:22 -07:00
Nate Prewitt
5a65a0dab1
use InvalidHeader instead of ConflictingHeaderError
2017-03-01 07:32:14 -07:00
Nate Prewitt
a52fe6586c
consolidate super_len code and cleanup docstrings
2017-02-28 14:51:08 -07:00
Casey Davidson
bfb202527d
Alternate fix for 3066 to refactor prepare_body to always call prepare_content_length.
...
This allows for the 'Content-Length' header to only be set in prepare_content_length.
2017-02-28 14:49:01 -07:00
Victor Pfautz
2aaf6ac038
Fixed some typos ( #3892 )
...
* Fixed some typos
2017-02-27 16:25:10 +00:00
David Fontenot
c121b98c4e
wrapped proxy_bypass() with cache lookup
...
Used to alleviate long gethostbyaddr calls
Made new TimedCache and decorator to wrap
a function with a cache
* Entries looked up older than a minute (default amount)
are evicted.
* When full, evicts the oldest entry
2017-02-23 14:04:16 -08:00
Cory Benfield
56dd77fc52
Merge branch 'master' into proposed/3.0.0
2017-02-14 15:59:53 +00:00
Nate Prewitt
f47aff68f1
properly handled failed seek
2017-02-14 07:45:41 -07:00
Rotem Yaari
efcbe93075
Make Response.raise_for_status() return the response object if the response is successful
...
This allows for chaining method calls in cases where we want to raise for bad codes but use the response otherwise,
e.g. requests.get(URL).raise_for_status().json()['value']
2017-02-12 11:11:40 +02:00
Nate Prewitt
16bbc7478f
revert removal of request param from resolve_redirects
2017-02-11 23:35:19 -07:00
kennethreitz
6bd6249051
Merge pull request #3865 from JohnVillalovos/master
...
Allow use of 'no_proxy' in the proxies argument
2017-02-10 15:50:10 -06:00
jonathan vanasco
70f31a3166
* initial attempt at get_redirect_target
...
* removing the `i` from the redirect detection while-loop
2017-02-10 13:53:23 -05:00
John L. Villalovos
85400d8d67
Allow use of 'no_proxy' in the proxies argument
...
Add the ability to add 'no_proxy' and a value to the 'proxies'
dictionary argument.
https://github.com/kennethreitz/requests/issues/2817
Closes gh-2817
2017-02-10 09:41:54 -08:00
Cory Benfield
241f2b2a6b
Merge branch 'master' into proposed/3.0.0
2017-02-10 17:40:52 +00:00
Matthew Medal
8a58427d8a
Only send HTTPDigestAuth on 4xx challenges
...
Resolves : #3772
2017-01-27 12:56:50 -08:00
kennethreitz
97b5bc21d1
fix broken tests
2017-01-21 21:41:16 -05:00
winterJ
e8c0a99cb1
Remove unused module
2017-01-11 18:20:52 +09:00
Герасименко Евгений
0cb6ddaecf
Fixed tests for python 2.x.
2016-12-29 10:30:56 +07:00
Герасименко Евгений
1c34ac3ae6
Fixed detection of utf-32-be by BOM.
2016-12-29 10:21:32 +07:00
Cory Benfield
9726f5314e
Merge pull request #3766 from nateprewitt/1979_test_401
...
testing HTTPDigestAuth hooks
2016-12-14 09:41:11 +00:00
Nate Prewitt
1da1213561
add socket tests for 401 redirect and 401 failure
2016-12-13 14:43:16 -07:00
Nate Prewitt
354ac7ecad
squash 3xx tests into super tests
2016-12-12 08:36:22 -07:00
Nate Prewitt
084fb05d52
fixing redirects for non-GET/HEAD/POST methods
2016-12-10 12:12:23 -07:00
Nate Prewitt
500dc75c8c
remove allowance of non-string/bytes auth values
2016-12-09 08:26:13 -07:00
Cory Benfield
c7e5c0d2b7
Merge branch 'master' into proposed/3.0.0
2016-12-09 14:49:18 +00:00
Ian Cordasco
fae6701478
Add deprecation warnings for 3.0
...
Add extra test parameter for basic auth encoding
2016-12-09 08:43:54 -06:00
Cory Benfield
4dae8de815
Merge branch 'master' into proposed/3.0.0
2016-12-09 08:45:34 +00:00
Nate Prewitt
576b447a37
adding string casting for non-bytes values
2016-12-08 21:13:14 -07:00
Cory Benfield
ba7c464a03
Merge branch 'master' into proposed/3.0.0
2016-12-08 09:16:51 +00:00
Nate Prewitt
13716728e7
minor doc string cleanup
2016-12-04 12:11:09 -07:00
Casey Davidson
14d71fd41a
Test chunked upload doesn't set content length
2016-12-04 12:01:07 -07:00
Casey Davidson
2d2c831d07
Add tests to verify that correct 'Content-Length' or 'Transfer-Encoding' headers are being set in PreparedRequest.
2016-12-04 12:00:57 -07:00
Cory Benfield
6f659a4179
Tests for our URL handling.
2016-11-30 21:45:09 +00:00
Cory Benfield
402a55b647
Revert "Restrict URL preparation to HTTP/HTTPS"
...
This reverts commit 34af72c87d .
2016-11-30 21:19:31 +00:00
Cory Benfield
5c4549493b
Merge pull request #3695 from nateprewitt/idna_bypass
...
idna bypass
2016-11-25 13:18:01 +00:00
Nicola Soranzo
f897be58bf
Make Response.content return None if raw is None
...
Add test.
2016-11-24 12:54:26 +00:00
Cory Benfield
b9f1c448f7
Merge pull request #3673 from klimenko-forks/auth-unicode
...
Enable unicode in basic http auth
2016-11-21 19:27:39 +00:00
Dmitry Klimenko
005f93fd0f
added new test, original test restored
2016-11-21 21:42:44 +03:00
Christian Heimes
34af72c87d
Restrict URL preparation to HTTP/HTTPS
...
Requests treats all URLs starting with the string 'http' as HTTP URLs.
Preparation with IDNA breaks non-standard URIs like http+unix. Requests
now prepares only URLs with prefix http:// and https://.
Signed-off-by: Christian Heimes <christian@python.org >
2016-11-21 18:46:57 +01:00
Nate Prewitt
d52e9b8c80
updated tests with IDNA encoded and IPv6 urls
2016-11-21 08:22:37 -07:00
Dmitry Klimenko
3b84be3c99
changed behavior of basic-http-auth test
2016-11-18 20:39:55 +03:00
Dmitry Klimenko
e15280e49d
fixed: httpbin with unicode auth
2016-11-18 19:04:51 +03:00
Dmitry Klimenko
55dea233ce
fixed some error
2016-11-18 15:19:43 +03:00
Dmitry Klimenko
4f0efdb77e
unicode test for _basic_auth_str
2016-11-18 13:31:31 +03:00
Dmitry Klimenko
7c4821231f
Fixed: httpbin doesn't support bytes
2016-11-18 13:14:08 +03:00
Dmitry Klimenko
bf3e960e15
fixed usage unicode string
2016-11-17 23:13:03 +03:00
Dmitry Klimenko
37bde4b638
added unicode auth test
2016-11-17 20:22:32 +03:00