On Thu, Oct 31, 2013 at 3:44 PM, msoulier <msoulier@digitaltorque.ca> wrote:
> Hi,
>
> If I return an HttpRedirect() with a relative URL in it, I notice that
> Django fully qualifies the redirect with a hostname and scheme.
>
> ie.
>
> Location /foo/bar/
>
> goes to
>
> Location https:myserver.mysite.com/foo/bar/
>
> Is there a reason to fully qualify like this? I've found relative URLs much
> more portable in the past, and they work through proxies, make no
> assumptions about SSL on or off, etc.
The Location header must always be a fully qualified URI, according to
every single version of the HTTP RFC from RFC 1945 onwards.
Cheers
Tom
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1%2Buju2ZbJyZRNS4x_2Zmfr8qeGkRaFG2G2UsK_93t8yXA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment