projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b98cc8b
)
Less redundant freeing of resources on redirects
author
Chris Adams
<chris@improbable.org>
Sun, 29 Jan 2012 23:45:14 +0000
(18:45 -0500)
committer
Chris Adams
<chris@improbable.org>
Sun, 29 Jan 2012 23:45:14 +0000
(18:45 -0500)
With
495646bb6a89802a60208c2ab09749edba1f8e51
the double flush is no longer
needed.
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
b4118b9
..
0647814
100644
(file)
--- 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()