| Summary: | GzipFilter should not attempt to compress HTTP status 204 | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Adam Zell <zellster> |
| Component: | server | Assignee: | Jan Bartel <janb> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | janb, jetty-inbox |
| Version: | unspecified | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Fixed for 7.5.5, and 8.0.5. |
Build Identifier: Jetty 7.5.4 HTTP status 204 should not contain a message body (similar to 304) and should be excluded from the GzipFilter logic: 121 public void setStatus(int sc, String sm) 122 { 123 super.setStatus(sc,sm); 124 if (sc<200||sc>=300) 125 noGzip(); 126 } Because the typical 204 response does not have a Content-Length header, the filter attempts to compress an empty response. Due to GZIP header information, the response does not end empty. Reproducible: Always Steps to Reproduce: 1.Configure GzipFilter 2.Return 204 from your servlet without setting Content-Length 3.