mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
fix the tests
This commit is contained in:
@@ -674,7 +674,10 @@ class Session(SessionRedirectMixin):
|
||||
|
||||
# If redirects aren't being followed, store the response on the Request for Response.next().
|
||||
if not allow_redirects:
|
||||
r._next = self.resolve_redirects(r, request, yield_responses=False, **kwargs).next()
|
||||
try:
|
||||
r._next = self.resolve_redirects(r, request, yield_responses=False, **kwargs).next()
|
||||
except StopIteration:
|
||||
pass
|
||||
|
||||
if not stream:
|
||||
r.content
|
||||
|
||||
Reference in New Issue
Block a user