Opened 13 years ago

Closed 13 years ago

#17817 closed Bug (fixed)

Django should not send invalid Location headers

Reported by: Paul McMillan Owned by: nobody
Component: Internationalization Version: 1.4-beta-1
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django's locale middleware currently includes code which generates Location headers with relative URIs.

According to RFC 1945 and 2616, Location headers must be constructed with an absolute URI. While some user agents may support the non-compliant behavior, Django itself should not rely on this, and should generate absolute URIs as it does elsewhere.

http://tools.ietf.org/html/rfc2616#section-14.30

https://code.djangoproject.com/browser/django/trunk/django/middleware/locale.py?rev=16405&order=name#L30

Change History (1)

comment:1 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [17633]:

Fixed #17817 -- Modified LocalMiddleware to use full URLs when redirecting to i18n URLs. Thanks to Paul for keeping an eye on the standards.

Note: See TracTickets for help on using tickets.
Back to Top