Opened 18 years ago
Closed 18 years ago
#5754 closed (fixed)
HttpResponse uses 'content-type' while GZipMiddleware expects 'Content-Type'
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Uncategorized | Version: | dev |
| Severity: | 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
Because GZipMiddleware expect different case that HttpResponse sets it does compress javascript - in the comment in GZipMiddleware it says it should not.
Change History (5)
comment:1 by , 18 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 18 years ago
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
GZipMiddleware uses response.get method, not response[] construction. And HttpResponse.get method is case sensitive.
comment:3 by , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
Good point -- I'd missed the typo in the get() method. It's a bug.
comment:5 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Note:
See TracTickets
for help on using tickets.
All access to headers in HttpResponse is done through the
__getitem__andhas_header()methods on that class, so the case won't matter. I think you're diagnosing the wrong issue here.Please reopen if you have more explanation about the real issue you are seeing, but I just tested HttpResponse and both 'content-type' and 'Content-Type' returned the same data, as expected.