Opened 9 years ago

Closed 9 years ago

#5772 closed (fixed)

GzipMiddleware compresses JavaScript by accident

Reported by: Simon Law <simon@…> Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: gzip middleware javascript
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

A small typo in GZipMiddleware causes it to compress files of Content-Type: */javascript, even though it shouldn't.

I've attached a patch that should fix this problem.

Attachments (1)

django-gzip.patch (558 bytes) - added by Simon Law <simon@…> 9 years ago.
Patch

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by Simon Law <simon@…>

Attachment: django-gzip.patch added

Patch

comment:1 Changed 9 years ago by durdinator

Triage Stage: UnreviewedReady for checkin

Looks good from here.

comment:2 Changed 9 years ago by Ramiro Morales

See also #5754.

comment:3 Changed 9 years ago by Matt Boersma

Doesn't this conflict with #5313? They're both in the "Ready for checkin" stage yet seem to be at cross purposes.

comment:4 Changed 9 years ago by Simon Law <simon@…>

I'm more than happy if you apply the patch in #5772, before clobbering it with #5313.

comment:5 Changed 9 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [6537]) Changed HttpResponse.get() to lower case the header value before looking it up. This makes it consistent will other header accesses. Fixed #5754, #5772.

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