Commit Graph

113 Commits

Author SHA1 Message Date
Hans Lellelid bfef8d99c8 Updated API docs for 'data' param in sessions module to indicate that file-like object is also supported. 2012-12-20 09:47:29 -05:00
Ian Cordasco 14da5cf180 A possible fix for #1036
I can only assume that the only possible thing to close on a session are the
adapters. As such, I wrote the close method for a session object which closes
all possible adapters.
2012-12-18 09:43:55 -05:00
Kenneth Reitz 6acce57271 no kwargs 2012-12-18 05:01:32 -05:00
Bryce Boe e355d6ac6c Fix issue 1027. Always persist cookies. 2012-12-17 17:13:18 -08:00
Kenneth Reitz 27c6dc3735 Merge pull request #1020 from Lukasa/misc
Fix off-by-one error.
2012-12-17 10:46:09 -08:00
Cory Benfield 8b1b706903 Fix off-by-one error. 2012-12-17 18:42:32 +00:00
Kenneth Reitz 1e64fbcb55 CURL_CA_BUNDLE 2012-12-17 13:41:20 -05:00
Kenneth Reitz 1451ba0c6d update docs 2012-12-17 08:33:18 -05:00
Kenneth Reitz a982b0d903 proxy manager 2012-12-17 07:21:10 -05:00
Kenneth Reitz c3431bb6f2 tension 2012-12-17 07:01:59 -05:00
Kenneth Reitz d11522b29e Connection Adapter Mounting! 2012-12-17 06:55:33 -05:00
Kenneth Reitz 4c3b9df609 /s/prefetch/stream 2012-12-17 06:35:01 -05:00
Kenneth Reitz 899c9a9522 fix cookies 2012-12-17 05:49:25 -05:00
Kenneth Reitz 42b0295521 __attrs__ 2012-12-17 05:48:18 -05:00
Kenneth Reitz 4bad1285b6 nice and cleanup 2012-12-17 05:47:41 -05:00
Kenneth Reitz a776e7cb3e fix params support 2012-12-17 05:23:22 -05:00
Kenneth Reitz def20cdb0c remove iter_json, don't want to commit to it 2012-12-17 05:12:59 -05:00
Kenneth Reitz 92355ada54 cleanup 2012-12-17 05:09:44 -05:00
Kenneth Reitz 4837900832 digest works!
added some nice backwards compatible stuff too
2012-12-17 04:55:58 -05:00
Kenneth Reitz 03c8e23dbb response 2012-12-17 03:56:58 -05:00
Kenneth Reitz 4e5c4a6ab7 further remove config 2012-12-17 03:26:47 -05:00
Kenneth Reitz f44bb31bec better yield 2012-12-17 03:13:19 -05:00
Kenneth Reitz b1bcaecc66 MaxRedirects 2012-12-17 03:12:50 -05:00
Kenneth Reitz cc4b0b110f further remove config 2012-12-17 03:08:25 -05:00
Kenneth Reitz 2b5aed78d0 actually honor details 2012-12-17 02:52:39 -05:00
Kenneth Reitz d5572ac13f history is a tuple, not list 2012-12-17 02:32:19 -05:00
Kenneth Reitz 0d183c41a9 epic redirect generator is epic 2012-12-17 02:27:07 -05:00
Kenneth Reitz 0bee888f73 redirects work! 2012-12-17 02:21:22 -05:00
Kenneth Reitz 4a01272fb3 cleanup 2012-12-17 01:25:55 -05:00
Kenneth Reitz 9ab3234f0e Merge remote-tracking branch 'origin/master' 2012-12-17 00:10:35 -05:00
Kenneth Reitz bf05b7aeb5 v1.0.0 2012-12-17 00:10:32 -05:00
Natan L ed360dcaf5 Fixed relative import.
For Python 3 support.
2012-12-15 19:53:56 -08:00
Kenneth Reitz 92d57036f3 WHOOOOOOOOOOOOOOOO 2012-12-15 05:50:01 -05:00
Kenneth Reitz 19e1f2037c session.send() 2012-12-15 00:45:43 -05:00
Kenneth Reitz ce595d4da7 Merge pull request #983 from jszakmeister/allow-strict
Add the ability to turn off HTTP 0.9 support.
2012-12-02 08:43:31 -08:00
John Szakmeister ed642cfb6d Add the ability to turn off HTTP 0.9 support.
While debugging an issue I discovered requests was coming back with 200
response, when it really shouldn't have.  It turns out this happened for
two reasons: the jetty server running the app was rather lame and
didn't fail the request as a Bad Request, and httplib was happy to let
malformed data through and call it success.

It turns out httplib's strict flag controls this behavior of whether or
not to validate the status line.  The underlying urllib3 supports the
concept as well.  There was a bug there to that is now fixed upstream.

The last step is exposing this through requests.  This introduces a
supports_http0.9 flag to help control this behavior.  It defaults to
to True to preserve the current behavior.   Setting it to False will
allow the underlying HTTPConnection to validate the status line.
2012-12-02 11:25:18 -05:00
Kenneth Reitz f553857beb remove safe mode 2012-11-27 12:42:11 -08:00
Jonatan Heyman 8269ee7266 Fixed so that safe_mode works for Sessions 2012-11-23 16:48:51 +01:00
Cory Benfield 0792acc130 Update documentation on Sessions.
This resolves issue #870. Better documentation here should be considered
for further work.
2012-11-17 10:57:26 +00:00
Ian Cordasco 8081d7b15c Fixes #817.
Use dicts and lists where necessary but accept both dicts and lists of
2-tuples everywhere.
2012-09-02 23:10:28 -04:00
Andrew Tolbert f18733d2be Fix for #804 - Session params ommited in 0.13.8. If default_kwarg is a list, attempt to convert to dictionary 2012-08-22 09:49:40 -05:00
Ian Cordasco ab56e4a9f1 Fix python3 tests.
I wasn't thorough enough with how I dealt with headers. Most of the header
logic in the Request object utilizes dictionary properties which will not work
with a key/value list.

I'll dig more into this, but I know the rest of the features are more
important so I'll take my time on this and send a separate pull request.
2012-08-18 14:41:13 -04:00
Ian Cordasco e02da89337 Merge branch 'develop' into key_val_lists
Conflicts:
	requests/models.py
	tests/test_requests.py

Remove some of Lukasa's duplication of my efforts in _encode_data.
2012-08-18 12:15:03 -04:00
Locker537 42d0a2169e Whitespace fixes following PEP8. 2012-08-16 17:38:35 -04:00
Ian Cordasco ceec572cb9 Merge branch 'develop' into key_val_lists
Conflicts:
    requests/models.py
2012-08-07 12:11:15 -04:00
Shivaram Lingamneni 3c0b94047c address connection leak issue from #520
* prefetch now defaults to True, ensuring that by default, sockets
  are returned to the urllib3 connection pool on request end
* sessions now have a close() method, notifying urllib3 to close pooled
  connections
* the module-level API, e.g., `requests.get('http://www.google.com')`,
  explicitly closes its session when finished

When prefetch is False, the open socket becomes part of the state of the
Response object, and it's the client's responsibility to read the whole
body, at which point the socket will be returned to the pool.
2012-08-05 21:09:13 -07:00
Ian Cordasco 1722f28971 Add to_key_val_lists to avoid repetition.
It uses the same logic whenever we're trying to use a list of key values and
avoid what I had started doing -- using the same pattern everywhere.

proxies, and headers should both be covered by this commit.
2012-08-05 23:29:10 -04:00
Ian Cordasco 2d5e38f30a params now accepts a k/v list.
Also added test for params accepting k/v lists.
2012-08-03 22:24:52 -04:00
Arup Malakar b28673368b Issue #505: Changed the store_cookie configuration to be part of the config dict, instead of being a new argument 2012-05-23 14:12:18 -07:00
Kenneth Reitz 4cf31b0b86 authors 2012-05-16 17:09:43 -07:00