Code

Opened 2 years ago

Closed 2 years ago

#17817 closed Bug (fixed)

Django should not send invalid Location headers

Reported by: PaulM 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

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.