HttpResponseRedirect uses/allows relative URIs for the HTTP Location header, which is forbidden by HTTP
|Reported by:||Owned by:||nobody|
|Cc:||henryk@…, tbarta@…, tyson@…, dev@…, forest@…, ludvig.ericson@…, sam@…, absoludity@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Using the HttpResponseRedirect class (for example as in part 4 of the Django tutorial) may create a Location: header in the HTTP response with a relative URI, which is forbidden by RFC 2616, section 14.30 (an absolute URI is required). Call me a perfectionist, but I think that should be fixed.
The best solution would probably be to automatically create an absolute URI if the URI that is used to create the Redirect is a relative one, so that the apps don't have to deal with it (and stay decoupled from the project). Alternatively update the tutorial and docs with information on how to create an absolute URI.
-- Henryk Plötz Grüße aus Berlin