Skip to content

Commit

Permalink
Update BiDiGzipFilter documentation
Browse files Browse the repository at this point in the history
Add Javadoc, add missed parameters and make it more precise.
  • Loading branch information
arteam committed Jul 19, 2015
1 parent 030871a commit 80b74fc
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 18 deletions.
46 changes: 28 additions & 18 deletions docs/source/manual/configuration.rst
Expand Up @@ -73,24 +73,34 @@ GZip
bufferSize: 8KiB
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| Name | Default | Description |
+=========================+============+===================================================================================================+
| enabled | true | If true, all requests with gzip in their Accept-Content-Encoding |
| | | headers will have their response entities encoded with gzip. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| minimumEntitySize | 256 bytes | All response entities under this size are not compressed. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| bufferSize | 8KiB | The size of the buffer to use when compressing. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| excludedUserAgents | [] | The set of user agents to exclude from compression. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| compressedMimeTypes | [] | If specified, the set of mime types to compress. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| gzipCompatibleDeflation | true | If true, then ZLIB deflation(compression) will be performed in the GZIP-compatible mode. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
| gzipCompatibleInflation | true | If true, then ZLIB inflation(decompression) will be performed in the GZIP-compatible mode. |
+-------------------------+------------+---------------------------------------------------------------------------------------------------+
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| Name | Default | Description |
+===========================+=====================+======================================================================================================+
| enabled | true | If true, all requests with ``gzip`` or ``deflate`` in the ``Accept-Encoding`` header will have their |
| | | response entities compressed and requests with ``gzip`` or ``deflate`` in the ``Content-Encoding`` |
| | | header will have their request entities decompressed. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| minimumEntitySize | 256 bytes | All response entities under this size are not compressed. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| bufferSize | 8KiB | The size of the buffer to use when compressing. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| excludedUserAgents | [] | The set of user agents to exclude from compression. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| excludedUserAgentPatterns | [] | The set of user agent patterns to exclude from compression. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| compressedMimeTypes | Jetty's default | The list of mime types to compress. The default is all types apart |
| | | the commonly known image, video, audio and compressed types. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| includedMethods | Jetty's default | The list list of HTTP methods to compress. The default is to compress only GET responses. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| deflateCompressionLevel | -1 | The compression level used for ZLIB deflation(compression). |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| gzipCompatibleDeflation | true | If true, then ZLIB deflation(compression) will be performed in the GZIP-compatible mode. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| gzipCompatibleInflation | true | If true, then ZLIB inflation(decompression) will be performed in the GZIP-compatible mode. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+
| vary | ``Accept-Encoding`` | Value of the `Vary` header sent with responses that could be compressed. |
+---------------------------+---------------------+------------------------------------------------------------------------------------------------------+


.. _man-configuration-requestLog:
Expand Down
Expand Up @@ -13,6 +13,78 @@

import static com.google.common.base.Preconditions.checkNotNull;

/**
* Builds GZIP filters.
*
* <p/>
* <b>Configuration Parameters:</b>
* <table>
* <tr>
* <td>Name</td>
* <td>Default</td>
* <td>Description</td>
* </tr>
* <tr>
* <td>{@code enabled}</td>
* <td>true</td>
* <td>If true, all requests with `gzip` or `deflate` in the `Accept-Encoding` header will have their
* response entities compressed and requests with `gzip` or `deflate` in the `Content-Encoding`
* header will have their request entities decompressed.</td>
* </tr>
* <tr>
* <td>{@code minimumEntitySize}</td>
* <td>256 bytes</td>
* <td>All response entities under this size are not compressed.</td>
* </tr>
* <tr>
* <td>{@code bufferSize}</td>
* <td>8KiB</td>
* <td>The size of the buffer to use when compressing.</td>
* </tr>
* <tr>
* <td>{@code excludedUserAgents}</td>
* <td>(none)</td>
* <td>The set of user agents to exclude from compression. </td>
* </tr>
* <tr>
* <td>{@code excludedUserAgentPatterns}</td>
* <td>(none)</td>
* <td>The set of user agent patterns to exclude from compression. </td>
* </tr>
* <tr>
* <td>{@code compressedMimeTypes}</td>
* <td>(Jetty's default)</td>
* <td>The list of mime types to compress. The default is all types apart the
* commonly known image, video, audio and compressed types.</td>
* </tr>
* <tr>
* <td>{@code includedMethods}</td>
* <td>(Jetty's default)</td>
* <td>The list list of HTTP methods to compress. The default is to compress
* only GET responses.</td>
* </tr>
* <tr>
* <td>{@code deflateCompressionLevel}</td>
* <td>-1</td>
* <td>The compression level used for ZLIB deflation(compression).</td>
* </tr>
* <tr>
* <td>{@code gzipCompatibleDeflation}</td>
* <td>true</td>
* <td>If true, then ZLIB deflation(compression) will be performed in the GZIP-compatible mode.</td>
* </tr>
* <tr>
* <td>{@code gzipCompatibleInflation}</td>
* <td>true</td>
* <td>If true, then ZLIB inflation(decompression) will be performed in the GZIP-compatible mode.</td>
* </tr>
* <tr>
* <td>{@code vary}</td>
* <td>Accept-Encoding</td>
* <td>Value of the `Vary` header sent with responses that could be compressed.</td>
* </tr>
* </table>
*/
public class GzipFilterFactory {
private boolean enabled = true;

Expand Down

0 comments on commit 80b74fc

Please sign in to comment.