diff options
author | Alejandro Colomar <alx@nginx.com> | 2023-09-01 01:41:48 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-10-25 13:38:49 +0200 |
commit | c2788b8a2abe4f18472a419c439532c23b53aa24 (patch) | |
tree | b6ca7b88f48ae7b88b0e5988b67a107651a2345a /src/nxt_http_compress.h | |
parent | 75e9535a250eb5c9d16a16633033786fde125758 (diff) | |
download | unit-c2788b8a2abe4f18472a419c439532c23b53aa24.tar.gz unit-c2788b8a2abe4f18472a419c439532c23b53aa24.tar.bz2 |
HTTP: compress: checking $header_accept_encoding.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_http_compress.h b/src/nxt_http_compress.h index 1d671bf9..27b8b1c3 100644 --- a/src/nxt_http_compress.h +++ b/src/nxt_http_compress.h @@ -16,6 +16,7 @@ #include "nxt_main.h" #include "nxt_router.h" #include "nxt_string.h" +#include "nxt_tstr.h" #include "nxt_types.h" @@ -28,6 +29,7 @@ struct nxt_http_compress_conf_s { int8_t level; size_t min_len; + nxt_tstr_t *accept_encoding; nxt_conf_value_t *mtypes; nxt_http_route_rule_t *mtrule; }; @@ -37,6 +39,8 @@ 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_compress_accept_encoding(nxt_task_t *task, + nxt_http_request_t *r, nxt_tstr_t *accept_encoding, nxt_str_t *encoding); 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, |