Skip to content
Myr

Merge pull request #998 from jamshid/master

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

Issue #996 Location should not be followed unless 30X response

authored by Kenneth Reitz · committed by Kenneth Reitz · parents a7344a0, 500dc78 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/models.py+1 added-1 removed
231 unmodified lines
232 r = build(resp)233234 if r.status_code in REDIRECT_STATI and not self.redirect:235236 while (('location' in r.headers) and236 while (('location' in r.headers and r.status_code in REDIRECT_STATI) and237 ((r.status_code is codes.see_other) or (self.allow_redirects))):238239 r.content # Consume socket so it can be released240
681 unmodified lines