#13336 closed (fixed)
Document example for setting HttpResponse headers is misleading because it users wrong cache header
Reported by: | dnjuls | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | cache reponse headers | |
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 |
Description
In the HttpReponse documentation (http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpResponse) exists and example for setting headers in for the HttpResponse object.
The header used in the example responsePragma = 'no-cache'
This header is intended for use in requests, not responses. See http://en.wikipedia.org/wiki/List_of_HTTP_headers#Avoiding_caching
Better use Cache-Control: no-cache
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 15 years ago
Attachment: | 13336.patch added |
---|
comment:2 by , 15 years ago
Has patch: | set |
---|
comment:3 by , 15 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
Trivial patch to replace Pragma by Cache-Control