Skip to content
Myr

Remove what appears to be an un-needed call to self.resolve_redirects when not following redirects as part of creating a request's history.

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

authored by David Black · committed by David Black · parent 9ed5db8 · Browse files · 1 file+6 added−4 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+6 added−4 removed

  • other:+6 added−4 removed

1 file+6 added−4 removed

modified:requests/sessions.py+6 added-4 removed
656 unmodified lines
657 extract_cookies_to_jar(self.cookies, resp.request, resp.raw)658659 extract_cookies_to_jar(self.cookies, request, r.raw)660661 # Redirect resolving generator.662 gen = self.resolve_redirects(r, request, **kwargs)663661 # Resolve redirects if allowed.662 if allow_redirects:663 # Redirect resolving generator.664 gen = self.resolve_redirects(r, request, **kwargs)665 history = [resp for resp in gen] if allow_redirects else []665 history = [resp for resp in gen]666 else:667 history = []668669 # Shuffle things around if there's history.670 if history:671 # Insert the first (original) request at the start
98 unmodified lines