diff options
| author | Alejandro Colomar <alx@nginx.com> | 2023-07-19 14:22:21 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-10-25 13:38:04 +0200 |
| commit | d05e2ab887602bb3f3f3020ba14f247f1dd18bef (patch) | |
| tree | 92b7b8ec652b2f911f30bec29f15e09092430421 /src/nxt_http_compress.c | |
| parent | 2549de1f5ff81653d5176fe20ebb3814c64d103f (diff) | |
| download | unit-d05e2ab887602bb3f3f3020ba14f247f1dd18bef.tar.gz unit-d05e2ab887602bb3f3f3020ba14f247f1dd18bef.tar.bz2 | |
HTTP: compress: added "encoding": "gzip".
Signed-off-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src/nxt_http_compress.c')
| -rw-r--r-- | src/nxt_http_compress.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_http_compress.c b/src/nxt_http_compress.c index 0f3d8a89..e27dd278 100644 --- a/src/nxt_http_compress.c +++ b/src/nxt_http_compress.c @@ -14,6 +14,7 @@ #include "nxt_conf.h" #include "nxt_errno.h" #include "nxt_http.h" +#include "nxt_http_compress_gzip.h" #include "nxt_list.h" #include "nxt_main.h" #include "nxt_mp.h" @@ -52,7 +53,8 @@ nxt_http_compress_init(nxt_router_conf_t *rtcf, nxt_http_action_t *action, return NXT_ERROR; } - if (0) { + if (nxt_str_eq(&conf->encoding, "gzip", strlen("gzip"))) { + conf->handler = nxt_http_compress_gzip; } else { return NXT_ERROR; |
