Thursday, October 31, 2013

relative URLs in redirects

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.

Thanks,
Mike

--
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/ac90be77-fa18-4577-8839-dce95cdec09d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment