Commit Graph

1653 Commits

Author SHA1 Message Date
David Gouldin 32f600b083 Allow copying of PreparedRequests without headers/cookies 2014-05-30 10:11:53 -07:00
Ian Cordasco 5ab79e2514 Remove unnecessary check for builtin_str 2014-05-28 08:17:18 -05:00
Ian Cordasco 3faff0b8ea Check for basestring, not just str
Fixes #2071
2014-05-27 20:29:44 -05:00
kennethreitz 6c72509f5b Merge pull request #2059 from jschneier/master
remove unused IteratorProxy
2014-05-27 11:28:11 -04:00
kennethreitz e71282394c Merge pull request #2064 from mgeisler/simplejson-syntax-error-import
compat: handle SyntaxError when importing simplejson
2014-05-27 11:25:54 -04:00
Cory Benfield 3346ad1134 Document and initialise Response.request 2014-05-26 16:40:45 +01:00
Martin Geisler 3b0fcb620d compat: handle SyntaxError when importing simplejson
We officially support Python 2.6 to 3.3, but simplejson does not
support Python 3.1 or 3.2:

  https://github.com/simplejson/simplejson/issues/66

Importing simplejson on Python 3.2 results in a SyntaxError because
simplejson uses the u'...' syntax (the syntax was not supported in
Python 3.0 to 3.2).

Support for loading simplejson instead of the stdlib json module was
added by #710:

  https://github.com/kennethreitz/requests/pull/710

No mention was made of the lack of support for Python 3.2, but it was
mentioned that simplejson can be faster than the stdlib json module.
2014-05-26 00:56:35 +02:00
Josh Schneier 7815953cb4 remove unused IteratorProxy 2014-05-23 11:52:17 -04:00
Kenneth Reitz 6366d3dd19 v2.3.0 2014-05-16 13:55:47 -04:00
Kenneth Reitz 343db40375 Merge remote-tracking branch 'origin/master' 2014-05-16 13:44:21 -04: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
Kenneth Reitz c15a8f8a3d CaseInsensitiveDict now looks like a normal dict 2014-05-12 15:10:15 -04:00
kennethreitz 5893cfcd90 Merge pull request #1972 from avidas/response_str
Add __str__ to case insensitive dict
2014-05-12 15:08:31 -04: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
kennethreitz 569cd23c00 Merge pull request #1937 from jaraco/master
Improved decoding support for Response.iter_content and iter_lines
2014-05-12 15:04:35 -04:00
Donald Stufft 626c48e947 Update urllib3 to 4fb351cd2 2014-05-12 14:43:50 -04:00
Cory Benfield 07f9a7ea02 Remove references to not-yet-made 2.3.0 release. 2014-05-03 10:59:14 +01:00
kennethreitz 54541a9927 Merge pull request #2021 from Lukasa/proxies2
Don't repopulate proxies if we don't trust the environment.
2014-04-28 17:49:27 -04:00
Cory Benfield 142b26ea7b Clearer description of Response.close(). 2014-04-28 19:42:30 +01:00
Cory Benfield 459f8dfccb Don't repopulate proxies if we don't trust the env. 2014-04-26 13:05:01 +01:00
apr 36b0481f24 Update urllib to 1.8.2 2014-04-24 14:43:26 -04:00
Pavlo Kapyshin 4ca4865170 Fix typo 2014-04-10 06:09:41 +03:00
kennethreitz ae5ecdf2ae Merge pull request #1959 from Feng23/master
support request tuple data
2014-03-31 10:30:36 -04:00
Stan Hu 6c839985b9 Update urllib to 1.8 (8a8c601bee) 2014-03-28 16:37:54 -07:00
Feng Liu 24819e8aae support request tuple data
rewrite the TestModels

Ajust the code
2014-03-27 10:41:49 +08: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
Avi Das c2e6fe4d5d Shorten str for case insensitive dict 2014-03-23 11:38:37 -05:00
kennethreitz fe4c4f1461 Merge pull request #1951 from Lukasa/proxyauth
Re-evaluate proxy authorization.
2014-03-23 10:51:48 -04:00
Avi Das a3fb689942 Fix parenthesis typo 2014-03-22 16:30:22 -05:00
Cory Benfield 90f7337858 Style changes thanks to @sigmavirus24. 2014-03-22 21:11:33 +00:00
Avi Das 98ac3df713 Add __str__ to case insensitive dict. Logging headers for debugging purposes is often necessary, and the currently logging the headers would be using __repr__ which would log the implementation detail of headers, caseinsensitivedict. Adding str lends a more printing and log friendly implementation for case insentitice dict 2014-03-22 15:42:23 -05: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
kennethreitz 110048f983 Merge pull request #1916 from schlamar/accept-encoding
Fix Accept-Encoding in default headers
2014-03-12 16:37:27 -04: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
Cory Benfield 6d7e8a97bb Split get_environ_proxies into two methods.
This makes it possible to get at the no_proxy logic separately.
2014-03-12 19:20:12 +00:00
Cory Benfield ee7fe02953 Ensure that .raw() is present after unpickling.
Some people will assume that .raw() is present, and they shouldn't get
AttributeErrors when they make that assumption on a pickled Response.
However, @kennethreitz has asked that we not be too dependent on
urllib3. For that reason, set to None.
2014-03-12 18:34:43 +00:00
schlamar a59fac5e4b Removed compress from accepted encodings. 2014-03-12 12:11:55 +01:00
Jason R. Coombs d289eb22f1 Always honor decode_unicode, even when _content is present.
--HG--
extra : amend_source : 25977a1227b163d49bf2e1aec6aa448e5cd3be8a
2014-03-04 16:33:40 -05:00
Jason R. Coombs c8226f69e1 Add documentation about decode_unicode. 2014-03-04 16:27:13 -05:00
kennethreitz d8557a2627 Merge pull request #1935 from cjstapleton/master
Add timeout to stream with testing
2014-03-03 13:14:37 -05: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
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