Opened 12 years ago

Closed 12 years ago

#7228 closed (fixed)

ETag value does not meet HTTP spec

Reported by: skjohn@… Owned by: nobody
Component: HTTP handling Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The HTTP spec says that ETag values should be quoted either as "etag" or W/"etag". The current implementation (in modules django.middleware.common and django.utils.cache) do not quote these.

The code would therefore change as follows:

etag =

etag = '"%s"' %

Attachments (1)

7228.diff (1.3 KB) - added by Simon Greenhill 12 years ago.
Patch implementing skjohn's suggestion

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Simon Greenhill

Attachment: 7228.diff added

Patch implementing skjohn's suggestion

comment:1 Changed 12 years ago by Simon Greenhill

Has patch: set
Triage Stage: UnreviewedReady for checkin
Version: 0.96SVN

comment:2 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [7659]) Fixed #7228 -- Fixed our ETag header creation to meet the HTTP spec, by quoting it. Thanks, skjohn@…

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