Skip to content
Myr

allow 3XX in danger_mode

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 e0d1b09 · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/models.py+2 added-2 removed
771 unmodified lines
772 pass773774 return content775776 def raise_for_status(self):776 def raise_for_status(self, allow_redirects=True):777 """Raises stored :class:`HTTPError` or :class:`URLError`, if one occurred."""778779 if self.error:780 raise self.error781782 if (self.status_code >= 300) and (self.status_code < 400) and not self.rquest.allow_redirects:782 if (self.status_code >= 300) and (self.status_code < 400) and not 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