#27606: Error in formatting HttpResponseRedirect
----------------------------------+--------------------------------------
     Reporter:  Jerome Leclanche  |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  Uncategorized     |                  Version:  1.10
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Description changed by Jerome Leclanche:

Old description:

> When initializing an HttpResponseRedirect with a redirect url that does
> not match the `allowed_schemes` attribute, the DisallowedRedirect
> exception is raised before ``super(HttpResponseRedirectBase,
> self).__init__(*args, **kwargs)`` is called, which sets `self._headers`.
>
> This causes repr()ing/printing the response to error out with
> AttributeError: 'HttpResponseRedirect' object has no attribute
> '_headers'.
>
> Ref: django/http/response.py (HttpResponseRedirectBase)

New description:

 When initializing an HttpResponseRedirect with a redirect url that does
 not match the `allowed_schemes` attribute, the DisallowedRedirect
 exception is raised before `super(HttpResponseRedirectBase,
 self).__init__(*args, **kwargs)` is called, which sets `self._headers`.

 This causes repr()ing/printing the response to error out with
 AttributeError: 'HttpResponseRedirect' object has no attribute '_headers'.

 Ref: django/http/response.py (HttpResponseRedirectBase)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/27606#comment:1>
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/062.b766c2ece9f6f5479477c1301de91cbe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to