Merge pull request #1020 from Lukasa/misc

Fix off-by-one error.
This commit is contained in:
Kenneth Reitz
2012-12-17 10:46:09 -08:00
+1 -1
View File
@@ -77,7 +77,7 @@ class SessionRedirectMixin(object):
resp.content # Consume socket so it can be released
if i > self.max_redirects:
if i >= self.max_redirects:
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)
# Release the connection back into the pool.