Miikka Koskinen
5bb2be9a23
Use session cookies when following redirects
...
When a redirect was followed, only the cookies set by the initial
response were used in the follow-up request. Fixes #1228 .
2013-03-12 18:43:58 +02:00
Florian Mueller
c41932e184
Fixed some pickeling issues with HTTPAdapter and Session
...
Added trust_env and stream to Session.__attrs__. Initialize
self._pool_connections and self._pool_maxsize in HTTPAdapter.
2013-03-12 16:04:19 +01:00
Darjus Loktevic
e706d18cf8
Pickling of Session and HTTPAdapter + a test
...
This is for issue #1088
2013-03-11 18:12:34 +00:00
Kenneth Reitz
d25ba77b2e
Merge remote-tracking branch 'origin/master'
2013-03-04 17:54:32 -05:00
Kenneth Reitz
c0d4b23cea
Merge branch 'httperror_init' of git://github.com/dmedvinsky/requests
...
Conflicts:
AUTHORS.rst
test_requests.py
2013-03-04 17:54:25 -05:00
Kenneth Reitz
99eead01a3
Merge pull request #1223 from andrewjesaitis/master
...
Fixes __getstate__ for session pickling
2013-03-04 14:52:31 -08:00
Andrew Jesaitis
d60845303b
Adds __attrs__ back to Session object
2013-03-04 11:07:29 -07:00
Kenneth Reitz
23d8522285
Revert "[ kennethreitz/requests#1208 ] adding a max_retries argument"
...
This reverts commit 796d3225dd .
2013-03-03 12:01:38 -05:00
Dmitry Medvinsky
c4f9340fb4
Add ability to pass response to HTTPError()
...
Just a little refactoring, but it seems nicer to me to be able to pass
the response when constructing the `HTTPError` instance instead of
constructing it and then changing the member variable.
2013-03-03 10:05:42 +04:00
Kenneth Reitz
d372a5b10b
Merge pull request #1190 from mkomitee/master
...
Pass user options to hooks
2013-03-02 13:04:00 -08:00
Kenneth Reitz
7aad3fd08c
Merge pull request #1219 from Wilfred/master
...
Adding max_retries as an argument
2013-03-02 13:02:26 -08:00
sprt
b80f8aa475
URLError doesn't exist anymore
2013-03-01 20:20:53 +01:00
Andrew Jesaitis
6a0845c984
Checks __attrs__ on session instance prior to iterating.
2013-02-28 15:13:57 -07:00
Wilfred Hughes
796d3225dd
[ kennethreitz/requests#1208 ] adding a max_retries argument
2013-02-27 16:01:23 +00:00
Ian Cordasco
be62645dd5
Revert "If Content-Length is already set.."[1]
...
This reverts commit 544d08d0f6 .
[1]"If Content-Length is already set, don't over ride it"
2013-02-25 09:29:05 -05:00
Kenneth Reitz
603fd42fe6
Merge pull request #1205 from sigmavirus24/fix1203
...
Missing line was allowing redirects with HEAD
2013-02-25 02:31:21 -08:00
Kenneth Reitz
1fc567449c
Merge pull request #1210 from Lukasa/urlencode_proxy
...
Unquote proxy usernames and passwords.
2013-02-25 02:31:00 -08:00
Kenneth Reitz
c01bc5be5b
Revert "Lukasa is lazy"
...
This reverts commit 178ff62b93 .
2013-02-22 08:23:34 -05:00
Cory Benfield
577dba2bf7
Unquote proxy usernames and passwords.
2013-02-22 11:33:01 +11:00
Ian Cordasco
a788cb7271
Missing line was allowing redirects with HEAD
...
Closes #1203
2013-02-20 08:57:37 -05:00
Kenneth Reitz
178ff62b93
Lukasa is lazy
2013-02-20 02:11:41 -05:00
Kenneth Reitz
aa99525537
Merge pull request #1193 from Lukasa/timeout_exception
...
Throw more informative exceptions.
2013-02-19 23:10:44 -08:00
Cory Benfield
c2480f65e6
Rethrow underlying exceptions.
2013-02-18 16:30:16 +11:00
Chase Sterling
3f86e22a07
Make sure session cookies do not overwrite explicit request cookies
...
Implement RequestsCookieJar.copy
Use RequestsCookieJar.update when merging cookiejars
2013-02-16 00:56:59 -05:00
Chase Sterling
f3393fb24c
Remove ability to from RequestCookieJar __getitem__, __setitem__ to use cookies as keys
2013-02-14 22:52:31 -05:00
Chase Sterling
87d9d9643c
Allow RequestsCookieJar to be updated with cookies from a CookieJar
2013-02-14 01:05:42 -05:00
Michael Komitee
d0285fac42
Use user supplied options when resending authenticated requests
...
Hooks sometimes have to send requests (e.g. when responding to a 401 during
authentication).
All keyword arguments should be passed along when hooks are dispatched so that
if a user wanted to use a timeout, stream, specify a cert location with the
verify flag, etc, their specification can be followed.
2013-02-13 19:11:38 -05:00
Ian Cordasco
4dfd6f3fc1
Dispatch hooks before following redirects
...
Fixes #1183
2013-02-12 23:00:06 -05:00
Kenneth Reitz
cdec20af65
Merge pull request #1181 from denis-ryzhkov/master
...
Fix of UnicodeDecodeError on unicode header name that can be converted to ascii.
2013-02-12 08:43:02 -08:00
Denis Ryzhkov
56f4b7ca68
Deleted is_py2 check from unicode_header_name fix thanks to Lukasa.
2013-02-12 09:51:46 +03:00
Piotr Dobrogost
4c8d1b9a7d
removed no longer used redirect codes from models
...
added numeric values of redirect codes in comments
2013-02-11 23:07:12 +01:00
Denis Ryzhkov
6da7e22a4a
Fix of UnicodeDecodeError on unicode header name that can be converted to ascii.
2013-02-11 15:37:58 +03:00
Kenneth Reitz
5d9fcc711b
Merge pull request #1180 from sigmavirus24/master
...
Fix Session level Cookie Handling
2013-02-10 16:43:21 -08:00
Ian Cordasco
2e31696156
Test and perfection for cookie handling.
...
I also fixed up some of the RequestsCookieJar methods so using
jar.update(other_jar) works without a problem. This cleans up some of the code
in sessions and the resolve_redirects method.
2013-02-10 19:36:36 -05:00
Kenneth Reitz
1da1490bcd
urllib3 update
...
#1053
2013-02-10 17:43:58 -05:00
Ian Cordasco
9cdc8325ae
Fix Setting a cookie on redirect
2013-02-10 17:43:37 -05:00
Ian Cordasco
9c8660dbb6
Resolve @piotr-dobrogost's concerns
...
Piotr had good objections to my not re-sending the body of the request on 307.
2013-02-10 17:14:45 -05:00
Ian Cordasco
e7bc9bf1b2
Preserve the original request.
...
Let's make a copy to preserve it.
2013-02-10 17:11:16 -05:00
Ian Cordasco
e2ad0d0fe8
We shouldn't be sending the data on redirect.
...
As such, we should remove the body from the old request as well as the
Content-Length header.
2013-02-10 17:11:16 -05:00
Ian Cordasco
3299771e34
Fix the potential issue mentioned in #1151
...
See: https://github.com/kennethreitz/requests/pull/1151#issuecomment-12905796
This is solved by just reusing the PreparedRequest from the last request.
2013-02-10 17:11:16 -05:00
Kenneth Reitz
f2be5fae27
Merge pull request #1161 from sigmavirus24/fix1159
...
If Content-Length is already set, don't override
2013-02-10 14:07:08 -08:00
Cory Benfield
b0657cf163
Guard against users sending unprepared requests.
2013-02-10 06:13:02 +00:00
Cory Benfield
d437c338d0
Add Proxy-Auth header when proxies have credentials.
2013-02-06 18:40:35 +00:00
Kenneth Reitz
9fc7059140
Merge pull request #1151 from sigmavirus24/fix1133
...
Move redirect handling from Session.request to Session.send
2013-02-05 11:42:51 -08:00
Ian Cordasco
544d08d0f6
If Content-Length is already set, don't override
...
Re: #1159
2013-02-01 11:58:23 -05:00
Yehuda Sadeh
b07c1ebd85
Fix POST 303 redirect resonse handling
...
This fixes issue #1156 .
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com >
2013-01-31 11:23:09 -08:00
Christopher Bare
9ff8cbe5fb
shorten filename by os.path.basename in guess_filename(obj)
2013-01-30 15:33:43 -08:00
Ian Cordasco
ba485913b6
Thanks to @maxcountryman for the code review
2013-01-30 10:58:32 -05:00
Ian Cordasco
a95bfd3032
Fix the elapsed test and #1133
2013-01-29 23:50:37 -05:00
Cory Benfield
2f7923bc05
More useful docstring.
2013-01-28 18:35:41 +00:00