From cf94c96a68904b0c541425bb2eb0ee816d6a4e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81re=CC=81my=20Bethmont?= Date: Tue, 9 Aug 2011 17:30:19 +0200 Subject: [PATCH] Always close connection during redirections. --- requests/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requests/models.py b/requests/models.py index 6d97e35e..926bb94b 100644 --- a/requests/models.py +++ b/requests/models.py @@ -192,6 +192,8 @@ class Request(object): (self.allow_redirects)) ): + r.close() + history.append(r) url = r.headers['location']