Commit Graph

247 Commits

Author SHA1 Message Date
Ian Cordasco 596ca83f0c Update verify check and doc-string 2014-08-26 14:20:19 -05:00
Ian Cordasco b4a7906bca Add Session method to merge environment settings with per-request settings 2014-08-26 14:20:19 -05:00
ContinuousFunction c7e087cf56 Added space and sentence case
Added space and sentence case as requested by sigmavirus24.
https://github.com/kennethreitz/requests/pull/2168
2014-08-21 11:05:02 -07:00
ContinuousFunction 2fc6e8a894 Update on Tracking Previous Requests
Modified the comment in sessions.py and rewrote the test in
test_requests.py
2014-08-19 10:51:26 -07:00
ContinuousFunction df641e74ff Tracking Previous Requests
Addresses the issue brought up here:
https://github.com/kennethreitz/requests/issues/1929
2014-08-17 19:13:26 -07:00
Ian Cordasco 3957b0befb Fix silly check 2014-07-02 10:42:00 -05:00
Ian Cordasco 84f67379c8 Update how we check verify when inspecting env variables 2014-07-02 10:26:15 -05:00
Eric L Frederich c3444f8c7a don't make duplicate requests for permanent redirects 2014-06-12 08:25:21 -04:00
Eric L Frederich ec3a2e6f04 rename resume/resume_incomplete to permanent_redirect according to rfc7238
Use temporary_redirect intead of temporary_moved to make the words
line up nicely ;-)
2014-06-11 11:08:10 -04:00
Cory Benfield 22433163b3 Update trivial mentions to RFC 2616. 2014-06-07 09:53:12 +01:00
schlamar 59c8d81381 Read content in Session.send instead of Adapter.send. 2014-05-12 22:42:54 +02:00
schlamar c2a1f28a2e Catch possible exceptions while consuming content of redirect responses. 2014-05-12 22:42:53 +02:00
Cory Benfield 459f8dfccb Don't repopulate proxies if we don't trust the env. 2014-04-26 13:05:01 +01:00
kennethreitz b8128d6b1e Merge pull request #1962 from sigmavirus24/fix-history-type
Fix #1960: A Response's history should be a list
2014-03-24 11:45:06 -04:00
kennethreitz 5f48e4a120 Merge pull request #1963 from sigmavirus24/fix-redirect-methods
Fix #1955: Do not use original request in redirect
2014-03-24 11:44:14 -04:00
Cory Benfield 90f7337858 Style changes thanks to @sigmavirus24. 2014-03-22 21:11:33 +00:00
Ian Cordasco 8fc6a65be8 Actually assign history 2014-03-15 12:48:29 -05:00
Ian Cordasco 8d693a2a27 Fix #1955: Do not use original request in redirect
The original request was never being properly overriden in resolve_redirects.
As such being having a POST request respond with a 303 would generate a GET
request. If the GET request encountered another redirect to something like a
307, then it would use the original request and generate another POST request.

There are two parts to this fix:

- The fix itself
- The test infrastructure to ensure it does not regress because HTTPBin is
  insufficient
2014-03-15 11:38:13 -05:00
Ian Cordasco daf56b3f62 Fix #1960: A Response's history should be a list 2014-03-15 10:33:00 -05:00
Cory Benfield 4f6dca42ea Remove some extraneous comments to please KR. 2014-03-12 21:21:14 +00:00
Cory Benfield 4d8cb3244e Add method for rebuilding proxy configuration.
This includes auth.
2014-03-12 19:22:40 +00:00
Cory Benfield 97cf16e958 Move auth rebuild to its own method. 2014-03-12 19:22:11 +00:00
kennethreitz 3c4b3747e4 Merge pull request #1921 from sigmavirus24/fix-session-header-none
Do not set headers with None value
2014-03-03 13:13:13 -05:00
Cory Benfield 81e88b70bd The timeout is in seconds. 2014-02-16 19:00:22 +00:00
Ian Cordasco d2f647cee4 Do not set headers with None value
- Regardless of whether they are on the session or not
- Fixes #1920
2014-02-14 16:15:21 -06:00
Zack Weinberg 0caa243212 New Response property, .is_redirect. 2014-02-13 14:27:42 -05:00
Kenneth Reitz c042c08179 who did this 2014-01-31 12:29:56 -05:00
Kenneth Reitz f74f5e3ebf cleanup shitty code 2014-01-31 12:27:05 -05:00
Cory Benfield d9f34c6848 Respect trust_env on redirect. 2014-01-31 07:36:44 +00:00
Cory Benfield 326a22e888 Better layout for checking. 2014-01-30 15:11:24 +00:00
Cory Benfield 7ba5a534ae Repopulate ~/.netrc auth. 2014-01-29 19:13:46 +00:00
Konstantinos Koukopoulos 8b792be81b on redirect pass URL as bytes. Fixes: #1887 2014-01-28 09:11:23 -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
Ian Cordasco 642bbf6060 Fixes #1805
Sure cookies are persisted to the session, but those new cookies are not added
to the next prepared request. We need to update that new request's CookieJar
with the new cookies.
2013-12-17 22:55:50 -06:00
Ian Cordasco e8bdcdb0a7 Address feedback from #1729
- Make the PreparedRequest's cookie jar an implementation detail
2013-12-04 06:45:18 -06:00
Chase Sterling 8bfe0d873f Store the request cookiejar in PreparedRequest.cookies fix #1728
Conflicts:
	requests/sessions.py
2013-12-04 06:38:58 -06:00
kennethreitz 5c915451e7 Merge pull request #1657 from sigmavirus24/fix-session-hooks
Honor session hooks
2013-12-03 17:33:42 -08:00
daftshady c26a6c310c remove unused import 2013-11-26 15:38:48 +09:00
daftshady 1adba3c9e9 modified 'merge_cookies' and update tests.
made sessions.py to use that method when merging cookies.
2013-11-26 15:28:59 +09:00
daftshady e40c1637c9 added new method 'merge_cookies' and use it when merging session cookies with param cookies. 2013-11-26 15:28:59 +09:00
daftshady 2bbd7ba1c2 Fixed #1711 2013-11-26 15:22:46 +09:00
Cory Benfield 3369d87da9 Cleanup the redirect if blocks. 2013-11-24 11:13:49 +00:00
Cory Benfield 470af31f4a Handle 301s 'properly'. 2013-11-24 11:09:00 +00:00
daftshady 4972133a9b use geturl to lower scheme 2013-11-19 19:54:46 +09:00
daftshady 8c8938e8cb issue #1746 : Don't lowercase the whole URL! 2013-11-19 18:59:22 +09:00
daftshady 1511dfa637 moved logic to Session object and added test case 2013-11-04 22:32:17 +09:00
Can Ibanoglu 0cd6959f19 Removed extra extra parentheses in SessionRedirectMixin.resolve_redirects 2013-10-22 23:48:04 +03:00
Ian Cordasco a4605fe324 Fix failing test to preserve behaviour 2013-10-07 21:17:59 -05:00
kennethreitz 318ca102cd Merge pull request #1635 from daftshady/dev
Fixed #1630 and added test case.
2013-10-07 16:22:49 -07:00
Ian Cordasco 5bf396d5d1 Honor session hooks 2013-10-07 12:23:16 -05:00