GzipFilter

From CauchoWiki

Jump to: navigation, search


GzipFilter requires Resin Professional

[edit] resin-web.xml

<web-app xmlns="http://caucho.com/ns/resin">
  <filter filter-name="gzip"
          filter-class="com.caucho.filters.GzipFilter">
   <init>
     <use-vary>true</use-vary>
   </init>
  </filter>

  <filter-mapping filter-name="gzip">
    <url-pattern>
      <exclude-pattern>*.pdf</exclude-pattern>
      <include-pattern>/*</include-pattern>
    </url-pattern>
  </filter-mapping>
</web-app>

[edit] init directives

AttributeMeaningDefault
allow-content-typeadds a content-type which should be compressedall
deny-content-typeadds a content-type which should not be compressednone
use-varySet the HTTP Vary header for Gzip requeststrue
no-cacheDisable caching of GZip responsefalse
embed-error-in-outputEmbeds any thrown exceptions in the gzip outputfalse

If <allow-content-type> is specified, any unmatched content-type will not be compressed.

Personal tools