Merge pull request #2210 from sigmavirus24/bug/2207

Fix #2207
This commit is contained in:
Cory Benfield
2014-09-09 15:24:24 +01:00
+2 -2
View File
@@ -134,8 +134,8 @@ class SessionRedirectMixin(object):
url = requote_uri(url)
prepared_request.url = to_native_string(url)
# cache the url
if resp.is_permanent_redirect:
# Cache the url, unless it redirects to itself.
if resp.is_permanent_redirect and req.url != prepared_request.url:
self.redirect_cache[req.url] = prepared_request.url
# http://tools.ietf.org/html/rfc7231#section-6.4.4