diff options
author | Alejandro Colomar <alx@nginx.com> | 2023-08-28 17:34:20 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-10-25 13:38:46 +0200 |
commit | 75e9535a250eb5c9d16a16633033786fde125758 (patch) | |
tree | 0cd3d857878962e7a0cb04a4429477ce83bbfa07 /src/nxt_http_compress.h | |
parent | d5906fc0a30d51bbd25f0b7026fba977962e6042 (diff) | |
download | unit-75e9535a250eb5c9d16a16633033786fde125758.tar.gz unit-75e9535a250eb5c9d16a16633033786fde125758.tar.bz2 |
HTTP: compress: added "mime_types" rule.
Signed-off-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src/nxt_http_compress.h')
-rw-r--r-- | src/nxt_http_compress.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/nxt_http_compress.h b/src/nxt_http_compress.h index 6e8e45f9..1d671bf9 100644 --- a/src/nxt_http_compress.h +++ b/src/nxt_http_compress.h @@ -20,21 +20,25 @@ struct nxt_http_compress_conf_s { - nxt_str_t encoding; + nxt_str_t encoding; - nxt_int_t (*handler)(nxt_task_t *task, - nxt_http_request_t *r, - nxt_http_compress_conf_t *conf); + nxt_int_t (*handler)(nxt_task_t *task, + nxt_http_request_t *r, + nxt_http_compress_conf_t *conf); - int8_t level; - size_t min_len; + int8_t level; + size_t min_len; + nxt_conf_value_t *mtypes; + nxt_http_route_rule_t *mtrule; }; -nxt_int_t nxt_http_compress_init(nxt_router_conf_t *rtcf, +nxt_int_t nxt_http_compress_init(nxt_task_t *task, nxt_router_conf_t *rtcf, nxt_http_action_t *action, nxt_http_action_conf_t *acf); ssize_t nxt_http_compress_resp_content_length(nxt_http_response_t *resp); +nxt_int_t nxt_http_compressible_mtype(nxt_task_t *task, nxt_http_request_t *r, + nxt_http_route_rule_t *mtrule); nxt_int_t nxt_http_compress_append_field(nxt_task_t *task, nxt_http_request_t *r, nxt_str_t *field, nxt_str_t *value); |