mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Fixed finally. Also requires updated httpbin.org
This commit is contained in:
@@ -449,6 +449,10 @@ class Session(SessionRedirectMixin):
|
||||
r = dispatch_hook('response', hooks, r, **kwargs)
|
||||
|
||||
# Persist cookies
|
||||
if r.history:
|
||||
# If the hooks create history then we want those cookies too
|
||||
for resp in r.history:
|
||||
extract_cookies_to_jar(self.cookies, resp.request, resp.raw)
|
||||
extract_cookies_to_jar(self.cookies, request, r.raw)
|
||||
|
||||
# Redirect resolving generator.
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ class RequestsTestCase(unittest.TestCase):
|
||||
self.assertEqual(r.status_code, 401)
|
||||
|
||||
s = requests.session()
|
||||
s.auth = auth
|
||||
s.auth = HTTPDigestAuth('user', 'pass')
|
||||
r = s.get(url)
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user