#31430: Bug in django.test.client.Client._handle_redirects
-----------------------------------------+------------------------
               Reporter:  Jacob Stöhr    |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Uncategorized  |        Version:  master
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 When handling redirects via the method mentioned above, for example via
 `client.get(path, follow=True)`, a failure will occur when a response
 received somewhere in the chain does not bases `HttpResponseRedirectBase`
 from django.http.response because only instances/objects which are derived
 from that class have the `url` attribute. The attribute is accessed inside
 the function mentioned in the summary to determine where to redirect to.

 For example:
 a view yields a 308 Code which will be an instance of a plain
 `HttpResponse` object instead of a subclass of `HttpResponseRedirectBase`,
 thus it does not have a `url` attribute with the url the response is
 redirecting to.

 I will hand in a patch soon.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31430>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.08304b48ae98d8a27e1e9b66355bfc9f%40djangoproject.com.

Reply via email to