John Peacock
c5fddb95ed
Only return a path if the cacert.pem file exists.
...
This will permit the deletion of just that one file in order
to fall back to the [probably more accurate but less consistent]
Distro provided CA certs.
2012-11-21 13:34:03 -05:00
Pavel Dmitriev
a02f3dec02
Fix for user-agent setting
2012-11-13 17:40:13 +02:00
Martijn Pieters
4decc7986e
Use a JSON-specific encoding detection when no encoding has been specified.
...
JSON *must* be encoded using UTF-8, UTF-16 or UTF-32 (see the [RFC][1]; detect the encoding based on the fact that JSON always starts with 2 ASCII characters.
[1]: http://tools.ietf.org/html/rfc4627#section-3
2012-10-25 17:43:52 +02:00
Lasse Vang Gravesen
b36863b2c0
quote_plus, unquote_plus added
...
compat.py: relevant imports added
utils.py: then those imports are imported here.
Nothing else was changed, but I saw mentions of quoting later in
utils.py but I wasnt sure what to do about that.
2012-10-22 23:58:49 +02:00
mmartin
4dfa51ae03
Issue 901:
...
Make value of Contents-Encoding header case insensitive per RFC 2616.
2012-10-19 14:17:32 -05:00
Radu Voicilas
820dfb0495
Making the code more PEP8 compliant
2012-10-09 00:42:49 +03:00
Kunal Mehta
4f9e552148
Use __iter__ rather than the inefficient nested for loops
2012-10-09 00:42:48 +03: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
Shivaram Lingamneni
77cf995165
permissive implementation of iter_content
...
This allows iter_content and iter_lines to succeed without
crashing even after the response content has been fetched
(iter_content gives you an iterator over the prefetched
content)
2012-09-02 01:42:30 -07:00
Rhys Elsmore
f3159ed4f6
Added in a link handler as per issue #711
2012-08-21 00:47:19 +10: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
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
Sævar Öfjörð Magnússon
350be4a549
Appengine workaround
2012-07-25 16:06:26 +00:00
Donald Stufft
21f60fe8df
Move the user agent generation into it's own utility function
2012-07-08 00:47:24 -04:00
Kenneth Reitz
065caa30f4
Merge pull request #629 from saschpe/develop
...
Add openSUSE certificate support
2012-06-28 17:26:30 -07:00
Kenneth Reitz
c3ad7af06c
include certifi
2012-06-28 15:58:00 -07:00
Sascha Peilicke
66ef8886c6
Add openSUSE certificate support
2012-06-15 14:16:16 +02:00
Kenneth Reitz
cb15310d6a
by @mwielgoszewski
2012-05-29 19:54:40 -04:00
Kenneth Reitz
1c0abbd74b
cleanup #633
2012-05-29 19:53:22 -04:00
Tzury Bar Yochay
7125fe5554
this try catch is a poor man's patch for issue #630 see https://github.com/kennethreitz/requests/issues/630
2012-05-24 06:17:21 +03:00
Shivaram Lingamneni
f25827c5b6
replace utils.randombytes with os.urandom
2012-05-15 15:42:03 -07:00
Rohan Jain
0ba8c44260
A utility function to fetch environment proxies
...
This adds support for lowercase environment proxy variables (which are
quite popular too). It returns proxies in a format compatible with
request's proxy parameter.
Moreover, it can be used in the request models for proxy defaults.
Signed-off-by: Rohan Jain <crodjer@gmail.com >
2012-05-04 10:44:01 +05:30
Shivaram Lingamneni
4d6871d917
Further changes to move cookies to CookieJar
2012-05-01 17:00:19 -07:00
Kenneth Reitz
a7da521a62
merge conflict
2012-04-22 22:26:53 -04:00
Shivaram Lingamneni
b4eb8663af
prefer certifi's bundle to the OS bundle
2012-04-22 18:43:59 -07:00
Shivaram Lingamneni
e1528ce3be
add the FreeBSD certificate bundle path
2012-04-19 14:27:26 -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
Jonty Wareing
06e4971fe7
Rewrite unquote_unreserved based on urllib.unquote
...
This is almost entirely taken from the unquote implementation in urllib,
slightly modified for the case in hand. It now deals with invalid %encodings
rather than exploding, and the code is somewhat simpler.
2012-04-11 14:56:19 +00:00
Kenneth Reitz
171b370b0e
app engine #498
2012-03-31 03:08:12 -04:00
Kenneth Reitz
fff5269d1a
Fix app engine error for #498
2012-03-30 23:15:43 -04:00
Kenneth Reitz
0dd6c40205
dict sequence
2012-03-13 16:42:16 -07:00
Kenneth Reitz
d078b69aef
catch cookie errors that are prone to failure
2012-03-09 08:56:41 -08:00
Kenneth Reitz
f0e0a62bbe
Merge branch 'develop' of https://github.com/honzajavorek/requests into develop
2012-02-25 23:14:49 -05:00
Kenneth Reitz
e18e79d820
python3 fix
2012-02-24 00:44:01 -05:00
Honza Javorek
09c0365255
str is redefined in compat module, but was not imported
2012-02-23 23:51:59 +01:00
Honza Javorek
1661bf6543
get_unicode_from_response returned str instead of unicode
2012-02-23 17:28:56 +01:00
Ben
572c15d049
Don't bonk if .netrc isn't readable.
...
It's possible in some shared hosting environments that the .netrc file isn't readable by the user for the calling process. In that circumstance, just forgo the netrc authentication.
2012-02-21 15:53:33 -06:00
Kenneth Reitz
fd7610dd7a
python 3 unicode grr
2012-02-20 16:07:36 -05:00
Kenneth Reitz
b0e1865073
netrc fix
2012-02-20 15:43:45 -05:00
Kenneth Reitz
79bb9ee141
netrc parsing
2012-02-20 15:35:19 -05:00
Kenneth Reitz
4f75f1f41d
Values can be none #433
2012-02-20 12:30:12 -05:00
Kenneth Reitz
fe10eeb5be
SCHEMAS
2012-02-20 12:25:53 -05:00
Cory Benfield
640538adcb
Fail if unsupported schemas are used.
...
requests only supports http and https. This change enforces that.
2012-02-16 20:20:20 +00:00
Kenneth Reitz
b5212ddc3d
remove bunk utils for decoding
2012-02-15 03:09:40 -05:00
Kenneth Reitz
e663c77e70
fix bytes
2012-02-15 02:54:00 -05:00
Kenneth Reitz
00b13673e3
simplify
2012-02-15 02:28:58 -05:00
Kenneth Reitz
1b6f1b091c
Merge branch '400-header_expand-unicode' of https://github.com/acdha/requests into develop
2012-02-15 01:25:29 -05:00
Matt Giuca
b8298b0710
Rename utils.requote_path to requote_uri.
...
It is now applied to a whole URI, not just the path.
2012-02-15 12:03:08 +11:00
Matt Giuca
1ffce4f7dc
Simplify requote_path.
...
It no longer needs to split on '/' since '/' will not be encoded.
2012-02-14 12:57:49 +11:00