Code

Opened 7 years ago

Closed 7 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@…> 7 years ago.
Patch

Download all attachments as: .zip

Change History (6)

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

Patch

comment:1 Changed 7 years ago by durdinator

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Looks good from here.

comment:2 Changed 7 years ago by ramiro

See also #5754.

comment:3 Changed 7 years ago by mboersma

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 7 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 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.