Opened 16 years ago
Closed 13 years ago
#11340 closed Bug (fixed)
HttpResponseNotModified should not return Content-Type header
| Reported by: | aparajita | Owned by: | nobody |
|---|---|---|---|
| Component: | HTTP handling | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | yes | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Currently the HttpResponseNotModified class always returns a Content-Type header of text/html. Safari 4 complains about this. The http spec does not say that a 304 response should not have a Content-Type header, but on the other hand it expressly forbids a content body, so a Content-Type header does seem superfluous.
In any case, this can be fixed (and Safari stops complaining) with a simple change to the HttpResponseModified class. A patch is attached.
Attachments (1)
Change History (7)
by , 16 years ago
| Attachment: | patch.diff added |
|---|
comment:1 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 15 years ago
comment:3 by , 15 years ago
| Needs tests: | set |
|---|---|
| Severity: | → Normal |
| Type: | → Bug |
comment:6 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
You would also need to change django.http.utils fix_IE_for_vary to not assume a content-type for this patch to work.