diff --git a/requests/models.py b/requests/models.py index b4118b93..0647814f 100644 --- a/requests/models.py +++ b/requests/models.py @@ -210,6 +210,8 @@ class Request(object): while (('location' in r.headers) and ((r.status_code is codes.see_other) or (self.allow_redirects))): + r.content # Consume socket so it can be released + if not len(history) < self.config.get('max_redirects'): raise TooManyRedirects()