Chase Sterling
98114245c6
Refactor merge_kwargs for clarity and to fix a few bugs
2013-05-20 21:20:51 -04:00
Cory Benfield
2b6ebd2521
Always percent-encode location headers.
2013-05-16 12:02:46 +01:00
Łukasz Langa
4c8af1fff4
Fixes #1320 : transport adapters stored in ordered form
2013-05-15 13:34:09 +02:00
Chase Sterling
0c609b59ab
Fix session CookieJars without breaking more stuff this time
2013-04-25 23:15:50 -04:00
Chase Sterling
9763a671da
Fix crash when session.cookies was not a RequestsCookieJar
2013-04-25 22:34:51 -04:00
Iuri de Silvio
736e8cd735
Fix max_redirects docs issue #1301
2013-04-17 12:27:06 -07:00
Ian Cordasco
c5d0a0931e
Change the method when it isn't already GET/HEAD
...
For some reason it was only change the method when a POST was being made. This
is almost certainly my fault.
Fixes #1303
2013-04-13 12:31:22 -04:00
Chase Sterling
49a3664222
Don't set all session cookies on response.cookies
2013-04-04 23:30:52 -04:00
Chase Sterling
d22ac00098
fix #1287 : Make sure expired cookies get removed from session.cookies
2013-04-04 22:11:38 -04:00
Ian Cordasco
1abd13700b
Closes #1280
...
Correct the doc-string for Session#request that I copied without thinking
about.
2013-04-02 09:27:25 -04:00
Kenneth Reitz
54ed5ed469
Revert "Fix for the issue https://github.com/kennethreitz/requests/issues/1280 "
...
This reverts commit ca0aea640d .
2013-04-02 08:13:46 -04:00
Kamil Szot
ca0aea640d
Fix for the issue https://github.com/kennethreitz/requests/issues/1280
2013-04-02 13:42:40 +02:00
Kenneth Reitz
75703d57e6
fix syntax error
2013-03-31 08:22:44 +03:00
Kenneth Reitz
bd6b981d12
Merge pull request #1267 from sigmavirus24/master
...
One last pull request before 1.2 ideally
2013-03-30 22:21:52 -07:00
Ian Cordasco
325ea7b7e2
Use session defaults instead of arbitrary ones
2013-03-29 20:18:58 -04:00
makto
4ffae38627
add 'max_redirects' to Session's __attrs__ to ensure proper serialization of Session
2013-03-29 20:58:15 +08:00
Ian Cordasco
0cd23d8d6e
Fix the tests and unseparate comments from code
...
See the comments on the previous few commits on GitHub.
2013-03-28 08:33:34 -04:00
Ian Cordasco
aca91e06f2
Restore Session.request docstring
...
Resolves #1251
2013-03-27 23:46:21 -04:00
Ian Cordasco
88177ec33f
Finally resolve #1084
...
Send body on redirect when POSTing or PUTing.
2013-03-27 23:30:00 -04:00
Ian Cordasco
478d49027f
Add correct defaults in Session.send()
...
Resolves #1258
Also fixed the tests to reflect the necessary changes.
2013-03-27 23:17:34 -04:00
Miikka Koskinen
120a2f385a
Do not pass cookies to resolve_redirects
...
SessionRedirectMixin is extending Session, so we can just use
self.cookies.
2013-03-12 18:45:11 +02:00
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
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
Kenneth Reitz
d372a5b10b
Merge pull request #1190 from mkomitee/master
...
Pass user options to hooks
2013-03-02 13:04:00 -08: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
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
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
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
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
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
Cory Benfield
b0657cf163
Guard against users sending unprepared requests.
2013-02-10 06:13:02 +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
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
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
Ian Cordasco
c8ad4f0b73
Move the timing work to Session.send
...
per @kennethreitz 's request
2013-01-28 11:53:02 -05:00
oczkers
40a060cf57
it`s more pep8 now
2013-01-27 02:04:12 +01:00
Ian Cordasco
1cfe59299b
Only call the hook once.
2013-01-23 11:51:37 -05:00
Ian Cordasco
e771aa9386
Comment & replace something that keeps disappearing
2013-01-23 11:28:30 -05:00
sprt
088f908d58
Add missing import
2013-01-23 15:45:14 +01:00