Commit Graph

82 Commits

Author SHA1 Message Date
Kenneth Reitz 8b141b326a json errors 2012-12-16 22:03:55 -05:00
Kenneth Reitz 92d57036f3 WHOOOOOOOOOOOOOOOO 2012-12-15 05:50:01 -05:00
Lyndsy Simon 710f09f806 Updates from ISC to Apache2 2012-12-05 16:19:14 -06: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
Jonatan Heyman 8269ee7266 Fixed so that safe_mode works for Sessions 2012-11-23 16:48:51 +01:00
Locker537 42d0a2169e Whitespace fixes following PEP8. 2012-08-16 17:38:35 -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
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
Arup Malakar c501784541 Issue #505: Allow disabling of cookie persistence/sending 2012-05-16 15:07:15 -07:00
Josh Imhoff cff70e75b7 New implementation of safe_mode. Now, we throw exceptions in models.py regardless of safe_mode. We catch those exceptions at the API level and return a blank Response. See safe_mode.py for details. 2012-05-09 14:47:29 -04:00
Ian Danforth 7b68c124d5 Sphinx throws an error if you don't escape ** in **kwargs 2012-03-18 18:09:58 -07:00
chadnickbok@gmail.com fc618aa78a Updated Requests api to accept a 'cert' argument.
This argument can be either a string, containing the path to a
pem-formatted key and certificate chain, or a tuple of (cert, key).

When supplied a tuple, the values are paths to an SSL certificate
chain file and key, respectively.
2012-03-14 17:15:29 -07:00
chadnickbok@gmail.com 82e69de44f Exposed key_file and cert_file in requests, to support https client certificates. 2012-03-14 15:57:30 -07:00
Kenneth Reitz 6f5735274b history for HEAD 3xx 2012-02-20 14:02:13 -05:00
Frank Kumro 0536e5b708 Added prefetch documentation for api 2012-01-12 22:16:31 -05:00
Shrikant Sharat Kandula 53d679edba The request method of Session class does not take a session argument. But api.request does. So, it has to be popped before you can send the whole kwargs dict to Session.request method. 2012-01-09 11:16:54 +05:30
Kenneth Reitz 49140d6880 2012 2012-01-01 00:44:20 -05:00
Kenneth Reitz 9fcfec18da ssl docs 2011-12-28 03:18:40 -05:00
Kenneth Reitz ca26c1a253 api cleanup 2011-12-28 02:42:57 -05:00
Kenneth Reitz a91ac242f3 simplify api.request 2011-12-28 01:51:26 -05:00
Kenneth Reitz 5e60279a19 whitespace 2011-12-14 10:37:46 -05:00
Nick Hatch a6412b02ba Fix spelling errors, typos. 2011-12-11 01:58:55 -06:00
Shrikant Sharat a350ceffb9 Rename use_session to session. 2011-11-25 11:41:40 +05:30
Shrikant Sharat 5c72601599 Add use_session argument to request method.
This allows usage of an existing session to make a request with the
request and the get, post etc. function.
2011-11-25 08:32:07 +05:30
Rolando Espinoza La fuente 58e018af13 updated docs for last change in files argument to support explicit filename. 2011-11-18 18:45:10 -04:00
Kenneth Reitz 6730818ddc explicit 2011-11-12 13:14:42 -08:00
Kenneth Reitz 474e17b0af remove bunk __all__s 2011-11-12 12:53:23 -08:00
Kenneth Reitz f1e8700e9a consistiency 2011-11-12 12:51:30 -08:00
Kenneth Reitz c05c64d21b better defaults 2011-11-12 12:48:45 -08:00
Kenneth Reitz 220f687e6f Merge branch 'develop' of https://github.com/jbrendel/requests into develop
Conflicts:
	AUTHORS
	requests/__init__.py
2011-11-09 22:15:54 -08:00
Kenneth Reitz 0c4342a3a6 prefetching on all methods 2011-11-09 17:47:19 -08:00
jbrendel 73ba48be2e Added support for OPTIONS method. 2011-11-08 12:31:18 +13:00
Kenneth Reitz e32840f631 fix request docs 2011-11-02 20:39:06 -04:00
Kenneth Reitz f1bb25b1ec bugfix 2011-10-23 15:39:33 -04:00
Kenneth Reitz f9dfbb73dd requests.request uses config 2011-10-22 20:28:19 -04:00
Kenneth Reitz 597ace5718 import cleanups 2011-10-22 18:13:22 -04:00
Kenneth Reitz d72d116214 Move request and get to session 2011-10-22 18:10:32 -04:00
Kenneth Reitz 194ff1ad89 #160 2011-10-20 22:09:08 -04:00
Kenneth Reitz 98c5ded4f3 Merge branch 'master' into develop 2011-10-19 16:36:22 -04:00
Kenneth Reitz cfd38263d1 imports cleanup for @alex 🍰 2011-10-19 15:54:22 -04:00
travis 055f7c1eb6 Some Doc and doctoring fixes by the Speling Poleece. 2011-10-19 10:00:13 -05:00
Kenneth Reitz 33dec52b8e merge cleanups 2011-10-13 22:05:57 -04:00
Kenneth Reitz aa31b6b4dd Merge fixes 2011-10-13 22:02:50 -04:00
Kenneth Reitz 46f0146adf Merge branch 'feature-content-streaming' of https://github.com/mitsuhiko/requests into feature/content-stream
Conflicts:
	AUTHORS
	HISTORY.rst
	docs/api.rst
	docs/community/faq.rst
	docs/user/intro.rst
	requests/api.py
	requests/models.py
2011-10-13 21:54:42 -04:00
Kenneth Reitz 892fcd6cc0 store hooks in Request. 2011-10-13 20:19:59 -04:00
Kenneth Reitz 9518d053a4 _return_request => return_response 2011-10-13 20:11:25 -04:00
Daniel Miller aa04cc9b42 Make get and head requests respect allow_redirects=False. 2011-10-05 14:36:12 -04:00
verm666 6f84ce72f2 Fixed logic for auto redirect in GET and HEAD methods. 2011-09-02 15:44:18 -04:00