Skip to content
Myr

Initial stop-the-bleeding fix

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

This is redundant but it avoids crashing otherwise working code. The code-smell from duplication suggests that this interface should be refactored slightly.

authored by Chris Adams · committed by Chris Adams · parent 3020d0e · Browse files · 1 file+3 added−0 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−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:requests/models.py+3 added
208 unmodified lines
209 if r.status_code in REDIRECT_STATI and not self.redirect:210 while (('location' in r.headers) and211 ((r.status_code is codes.see_other) or (self.allow_redirects))):212213 r.content # Consume socket so it can be released214215 if not len(history) < self.config.get('max_redirects'):216 raise TooManyRedirects()217218 history.append(r)
44 unmodified lines
263 r = request.response264 self.cookies.update(r.cookies)265266 r.history = history267 r.content # Consume socket so it can be released268269 self.response = r270 self.response.request = self271 self.response.cookies.update(self.cookies)
532 unmodified lines