#24713: Redirect loop detection in test client is incorrect
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
agmathew |
Type: Bug | Status: new
Component: Testing | Version: 1.8
framework |
Severity: Normal | Keywords: redirect loop detection test client
Triage Stage: | Has patch: 0
Unreviewed |
Easy pickings: 0 | UI/UX: 0
-------------------------+-------------------------------------------------
We recently upgraded our Django installation from 1.6 and 1.8 and noticed
our unit tests were failing in multiple places. We tracked down the
problem to changes stemming from the fix for #23682, which introduces
stronger looper detection for redirects. The problem is that we have logic
in our codebase that goes like this:
* Go to /view/
* If a dirty bit is set, redirect to /update/ and remove the dirty bit
* Redirect back to /view/
The loop detection erroneously considers this a redirect loop because
/view/ is visited twice. Browsers don't have a problem with our redirects.
I propose that the redirect loop detection should check that a previous
site has been visited N times (for some value of N) before reporting a
redirect loop. If this sounds reasonable, I can create a patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/24713>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.46b49cb87fb12cd7d36a7b993f92ba7c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.