@Lukasa wrote the fix in #2207
This commit is contained in:
Ian Cordasco
2014-09-07 12:02:23 -05:00
parent 359659cf4b
commit 27c83f7177
+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