Skip to content
Myr

feedback from @sigmavirus42

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent dfd667d · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:requests/sessions.py+3 added-3 removed
112 unmodified lines
113 return to_native_string(location, 'utf8')114 return None115116 def resolve_redirects(self, resp, req, stream=False, timeout=None,117 verify=True, cert=None, proxies=None, yield_responses=True, **adapter_kwargs):117 verify=True, cert=None, proxies=None, yield_requests=False, **adapter_kwargs):118 """Receives a Response. Returns a generator of Responses or Requests."""119120 hist = [] # keep track of history121
80 unmodified lines
202203 # Override the original request.204 req = prepared_request205206 if not yield_responses:206 if yield_requests:207 yield req208 else:209210 resp = self.send(
462 unmodified lines
673674 # If redirects aren't being followed, store the response on the Request for Response.next().675 if not allow_redirects:676 try:677 r._next = self.resolve_redirects(r, request, yield_responses=False, **kwargs).next()677 r._next = self.resolve_redirects(r, request, yield_requests=True, **kwargs).next()678 except StopIteration:679 pass680681 if not stream:
86 unmodified lines