1

I'm using Jetty 6.1 together with PJL Compressing Filter.

Jetty removes the following header from the response:

Content-Encoding: gzip

This causes that most browsers cannot display the page anymore and show something like this:

Error 330 (net::ERR_CONTENT_DECODING_FAILED)

The Problem does not occur when I deploy my application on Tomcat 6.0. Also, if I disable the PJL Compressing Filter, the application works.

What can I do that Jetty leaves the header in the response?

Bob
  • 5,510
  • 9
  • 48
  • 80

1 Answers1

0

make it sure you're using the last available jetty version.

It does work with this configuration for me:

<filter>
    <filter-name>GzipFilter</filter-name>
    <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
    <init-param>
      <param-name>mimeTypes</param-name>
      <param-value>text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,application/json,image/svg+xml</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>GzipFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
Rafael Sanches
  • 1,823
  • 21
  • 28