GzipFilter
From Resin 3.0
(Difference between revisions)
(renamed tag to directive) |
|||
(One intermediate revision by one user not shown) | |||
Line 20: | Line 20: | ||
</web-app> | </web-app> | ||
− | === init | + | === init directives === |
{| | {| | ||
Line 26: | Line 26: | ||
|- | |- | ||
|allow-content-type||adds a content-type which should be compressed||all | |allow-content-type||adds a content-type which should be compressed||all | ||
+ | |- | ||
+ | |deny-content-type||adds a content-type which should not be compressed||none | ||
+ | |- | ||
|use-vary||Set the HTTP Vary header for Gzip requests||true | |use-vary||Set the HTTP Vary header for Gzip requests||true | ||
|- | |- | ||
Line 32: | Line 35: | ||
|embed-error-in-output||Embeds any thrown exceptions in the gzip output||false | |embed-error-in-output||Embeds any thrown exceptions in the gzip output||false | ||
|} | |} | ||
+ | |||
+ | If <allow-content-type> is specified, any unmatched content-type will not be compressed. |
Latest revision as of 20:21, 21 February 2006
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
Attribute | Meaning | Default |
---|---|---|
allow-content-type | adds a content-type which should be compressed | all |
deny-content-type | adds a content-type which should not be compressed | none |
use-vary | Set the HTTP Vary header for Gzip requests | true |
no-cache | Disable caching of GZip response | false |
embed-error-in-output | Embeds any thrown exceptions in the gzip output | false |
If <allow-content-type> is specified, any unmatched content-type will not be compressed.