Skip to content
Myr

Less redundant freeing of resources on redirects

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

With 495646bb6a89802a60208c2ab09749edba1f8e51 the double flush is no longer needed.

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

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:requests/models.py+2 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)
584 unmodified lines