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_gzip.c | |
| 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_gzip.c')
| -rw-r--r-- | src/nxt_http_compress_gzip.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nxt_http_compress_gzip.c b/src/nxt_http_compress_gzip.c index 2d0d65ae..c1ff962b 100644 --- a/src/nxt_http_compress_gzip.c +++ b/src/nxt_http_compress_gzip.c @@ -66,6 +66,16 @@ nxt_http_compress_gzip(nxt_task_t *task, nxt_http_request_t *r, return NXT_OK; } + ret = nxt_http_compressible_mtype(task, r, conf->mtrule); + switch (ret) { + case NXT_ERROR: + return NXT_ERROR; + case 0: + return NXT_OK; + case 1: + break; + } + r->resp.content_length = NULL; r->resp.content_length_n = -1; |
