summaryrefslogtreecommitdiffhomepage
path: root/src/java/javax/websocket
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-11-20 17:02:22 +0000
committerAndrew Clayton <a.clayton@nginx.com>2025-04-14 18:11:53 +0100
commit85a00914df5d603649b5177a2bca07f0314d6488 (patch)
treea373d3eed7c4307af38341431dc6c025e2d76e2a /src/java/javax/websocket
parentc9b2ecd28407538d3ef0b48bba944440695196ed (diff)
downloadunit-85a00914df5d603649b5177a2bca07f0314d6488.tar.gz
unit-85a00914df5d603649b5177a2bca07f0314d6488.tar.bz2
http: Wire up HTTP compression support to the config system
This exposes a new "settings.http.compression" configuration object. Under which are types & compressors objects. types is used to specify what MIME types should be considered compressible. compressors is used to configure an array of compressors that are available. For each of these, you specify the encoding, e.g gzip and optional level and min_length parameters. Where level is what compression level to use and min_length is the minimum length of data that should be compressed. By default the default compression level for the specified compressor is used and there is no minimum data length considered for compression. It may look something like "settings": { "http": { "server_version": true, "static": { "mime_types": { "text/x-c": [ ".c", ".h" ] } }, "compression": { "types": [ "text/*" ], "compressors": [ { "encoding": "gzip", "level": 3, "min_length": 2048 }, { "encoding": "deflate", "min_length": 1024 }, { "encoding": "zstd", "min_length": 2048 }, { "encoding": "br", "min_length": 256 } ] } } }, Currently this is a global option that will effect both static and application responses. In future it should be possible to add per-application (and perhaps even per-static) configuration. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/java/javax/websocket')
0 files changed, 0 insertions, 0 deletions