#17092: Internal Redirects with Apache
--------------------------------------+------------------------------------
Reporter: anonymous | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: HTTP handling | Version: 1.3
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by anonymous):
This cannot be done with middleware. apply_response_fixes gets called
after middleware has already had it's shot at the response. Mod_rewrite
doesn't help when you want django to do some checks and only conditionally
pass the internal redirect response. Leaving the only possible option an
ugly hack.
{{{
request.get_host = lambda: ''
}}}
While we shouldn't assume that all responses will support the CGI spec, it
also doesn't seem right to me to break a widely used standard such as CGI
in core with no clean way to get the standard behavior.
I'm leaving as closed but in case any core devs reconsider I would still
be happy to contribute a patch that would allow a clean way to get this
behavior.
--
Ticket URL: <https://code.djangoproject.com/ticket/17092#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.