Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366106

Summary: IncludableGzipFilter does not honor minGzipSize init param setting
Product: [RT] Jetty Reporter: Joakim Erdfelt <joakim.erdfelt>
Component: serverAssignee: Joakim Erdfelt <joakim.erdfelt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.5.4   
Target Milestone: 7.5.x   
Hardware: All   
OS: All   
Whiteboard:

Description Joakim Erdfelt CLA 2011-12-08 15:34:51 EST
When using minGzipSize init param with the IncludableGzipFilter, all content seems to be compressed regardless of minGzipSize setting.

Scenario:

The configuration for IncludeableGzipFilter
mimeTypes: application/soap+xml
excludedAgents: MSIE 6.0
minGzipSize: 2048
unchckedPrintWriter: true

Sending a javascript file at size 1024, gets compressed down to 403 bytes.
Even tho the original javascript file is both under the minGzipSize and also not present in the mimeTypes init configurable.
Comment 1 Joakim Erdfelt CLA 2011-12-08 15:35:47 EST
The propagation of minGzipSize, mimeTypes, and bufferSize in the
IncludableGzipFilter#IncludableResponseWrapper seems to be at blame.
Comment 2 Joakim Erdfelt CLA 2011-12-08 17:06:03 EST
Created unit test to verify failure to honor minGzipSize.
Fixed setting of minGzipSize + bufferSize + mimeTypes in new IncludableGzipWrapper.