#13755 closed Bug (fixed)
HttpRequest.is_ajax() should be used together with vary_on_headers('HTTP_X_REQUESTED_WITH')
| Reported by: | Miloslav Pojman | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | 1.0 |
| Severity: | Normal | Keywords: | |
| Cc: | miloslav.pojman@… | 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
Sending different response depending on HttpRequest.is_ajax() breaks Django cache middleware (an possibly others).
Easy fix is use vary_on_headers('HTTP_X_REQUESTED_WITH') decorator and I think this practice should be documented near is_ajax method http://docs.djangoproject.com/en/1.2/ref/request-response/#django.http.HttpRequest.is_ajax
Attachments (1)
Change History (10)
comment:1 by , 15 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 15 years ago
| Cc: | added |
|---|
comment:3 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → Bug |
comment:4 by , 14 years ago
| UI/UX: | unset |
|---|
by , 11 years ago
| Attachment: | 13755.diff added |
|---|
comment:6 by , 11 years ago
| Has patch: | set |
|---|
comment:7 by , 11 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:8 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Change UI/UX from NULL to False.