Skip to content
Myr

don't raise for redirects if they're not allowed

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 ceb42dd · 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
777 unmodified lines
778779 if self.error:780 raise self.error781782 if (self.status_code >= 300) and (self.status_code < 400):782 if (self.status_code >= 300) and (self.status_code < 400) and not self.rquest.allow_redirects:783 raise HTTPError('%s Redirection' % self.status_code)784785 elif (self.status_code >= 400) and (self.status_code < 500):786 raise HTTPError('%s Client Error' % self.status_code)
3 unmodified lines