Commit Graph

334 Commits

Author SHA1 Message Date
Kenneth Reitz f9dd485582 Merge pull request #640 from JuhaS/patch-1
Small correction on a comment.
2012-05-29 16:45:54 -07:00
Kenneth Reitz d0f309b947 Merge pull request #638 from mher/develop
no_proxy support
2012-05-29 16:44:56 -07:00
JuhaS ba4cc326c2 Small correction on a comment. 2012-05-28 16:28:31 +03:00
Mher Movsisyan cb8f9756e3 Fixes python3 compatibility issue 2012-05-28 14:11:59 +05:00
Mher Movsisyan b8561cda5e no_proxy support 2012-05-27 22:21:26 +05: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
ztest ed767cb703 Fix a docstring typo (of -> if). 2012-05-12 13:09:14 -04:00
Shivaram Lingamneni 0442122d34 remove unused import 2012-05-10 15:14:44 -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
Roman Haritonov 33f1087584 Move session cookie saving from Session.request() to Request._build_response() 2012-05-08 13:02:39 +04:00
Kenneth Reitz 6b09e6ee34 redirects clear files also
Fixes #575
2012-05-08 01:14:17 -04:00
Kenneth Reitz 2a7811bf2f Merge remote-tracking branch 'origin/develop' into develop 2012-05-08 00:58:32 -04:00
Kenneth Reitz fe7348cc53 yay json
fixes #593
2012-05-08 00:57:46 -04:00
barberj 3288426f2b added unicode strings 2012-05-06 15:14:57 -07:00
barberj ed7b14899f added mutlipart file=strings 2012-05-06 15:14:40 -07:00
Kenneth Reitz c84012edec Merge pull request #585 from chazapis/develop
Fix out-of-range issue with iter_lines (#515).
2012-05-04 11:49:49 -07:00
Kenneth Reitz 38e6695627 Merge pull request #581 from crodjer/develop
A utility for using environment proxies
2012-05-03 23:28:07 -07:00
Rohan Jain abc38cf17f Use utility for environment proxy as fallback
Signed-off-by: Rohan Jain <crodjer@gmail.com>
2012-05-04 10:44:07 +05:30
Shivaram Lingamneni 35ec6bb613 fix for #458 2012-05-03 21:16:56 -07:00
Shivaram Lingamneni 853a07112b consistency: .text shouldn't recover from unicode decoding errors, either 2012-05-02 20:21:02 -07:00
Shivaram Lingamneni 538de55607 raise a ValueError if no encoding was sent and chardet is unavailable 2012-05-02 20:21:02 -07:00
Kenneth Reitz 8ac6b266c9 pre-send hook
#516
2012-05-02 19:09:18 -04:00
Kenneth Reitz efe5d13ed6 Merge pull request #516 from EnTeQuAk/move_pre_request
Move pre_request to a more usable place, followup to #382
2012-05-02 15:58:08 -07:00
Kenneth Reitz 996f99b267 Merge remote-tracking branch 'origin/develop' into develop 2012-05-02 18:47:53 -04:00
Kenneth Reitz 62d2ea8034 default chunk size for .content much bigger 2012-05-02 18:47:50 -04:00
Idan Gazit cf6b20429a Merge remote-tracking branch 'upstream/develop' into develop 2012-05-03 00:08:00 +03:00
Idan Gazit 324336e7f6 Lazily encode data, params, files
Previously, data, params, and files were encoded and stored in
Request.__init__, and subsequently put into service during
Request.send. The problem with this approach is that hooks and auth
callables need to be aware of the eager encoding, and if they touch the
originals, make sure to update the encoded versions.

A better approach is to only encode late in the sending process. This
way, hooks and auth callables can safely make changes without fear of
the old, encoded variant overriding it.
2012-05-03 00:04:13 +03:00
Idan Gazit d240b1fe15 PEP8 Cleanup 2012-05-02 23:16:38 +03:00
Antony Chazapis c333bd144e Fix out-of-range issue with iter_lines (#515). 2012-05-02 16:51:19 +03:00
Kenneth Reitz 6271046a27 Revert "Cache the value of the Response.text property"
This reverts commit d232948188.
2012-05-02 02:38:11 -04:00
Kenneth Reitz 8a81a437d2 Revert "Use utf-8 as the default encoding"
This reverts commit 35d5ac6e8f.
2012-05-02 02:37:51 -04:00
Shivaram Lingamneni d232948188 Cache the value of the Response.text property 2012-05-01 22:28:50 -07:00
Shivaram Lingamneni 35d5ac6e8f Use utf-8 as the default encoding
(fixes crashes on failure to import chardet)
2012-05-01 21:46:53 -07:00
Shivaram Lingamneni ff169d32fe fix and test for a bug dhagrow reported 2012-05-01 17:00:19 -07:00
Shivaram Lingamneni 4d6871d917 Further changes to move cookies to CookieJar 2012-05-01 17:00:19 -07:00
miguel c4ab96b638 mostly complete cookie support based on cookiejar 2012-05-01 17:00:19 -07:00
miguel 2a27b123fd catch TooManyRedirects in safe_mode 2012-05-01 17:00:19 -07:00
Kenneth Reitz d79e1bbaad or str 2012-05-01 07:02:13 -04:00
Kenneth Reitz 14fae695bf uh, sure 2012-05-01 06:47:58 -04:00
Kenneth Reitz be04142723 Revert "Call auth callable before encoding body data"
This reverts commit 9217a2523d.
2012-05-01 06:42:58 -04:00
Idan Gazit 65bf3ab201 Backing out stupidly incorrect str vs unicode check
It's simply wrong. Since compat.py sets str = unicode for py2, the
original logic is sound.
2012-05-01 06:20:53 -04:00
Idan Gazit 9217a2523d Call auth callable before encoding body data 2012-05-01 06:20:52 -04:00
Idan Gazit 0aedef07c3 Improve _encode_params to handle lists of two-element tuples 2012-05-01 06:20:52 -04:00
Idan Gazit 3e60a9eb9c Proper test for str vs unicode when preparing data
In python 2.x, requests sets str = unicode in requests/compat.py. This causes
isinstance(foo, str) to return True even if foo is a unicode string.
2012-05-01 06:20:52 -04:00
Shivaram Lingamneni b4eb8663af prefer certifi's bundle to the OS bundle 2012-04-22 18:43:59 -07:00
Shivaram Lingamneni 9921099546 Try to use the OS's CA certificate bundle for SSL verification 2012-04-16 15:28:31 -07:00
Roman Haritonov d569a2d6bc fix #549 Add 'prefetch' to Session.__attrs__ and Requests.__init__ 2012-04-13 19:25:10 +04:00
Kenneth Reitz e3ba495ed9 Merge branch 'develop' of https://github.com/catwell/requests into develop 2012-04-13 08:34:18 +02:00