summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_http_compress.c')
-rw-r--r--src/nxt_http_compress.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nxt_http_compress.c b/src/nxt_http_compress.c
index e27dd278..f78a16ed 100644
--- a/src/nxt_http_compress.c
+++ b/src/nxt_http_compress.c
@@ -23,12 +23,20 @@
#include "nxt_types.h"
+#define NXT_DEFAULT_COMPRESSION (-1)
+
+
static nxt_conf_map_t nxt_http_compress_conf[] = {
{
nxt_string("encoding"),
NXT_CONF_MAP_STR,
offsetof(nxt_http_compress_conf_t, encoding),
},
+ {
+ nxt_string("level"),
+ NXT_CONF_MAP_INT8,
+ offsetof(nxt_http_compress_conf_t, level),
+ },
};
@@ -47,6 +55,8 @@ nxt_http_compress_init(nxt_router_conf_t *rtcf, nxt_http_action_t *action,
return NXT_ERROR;
}
+ conf->level = NXT_DEFAULT_COMPRESSION;
+
ret = nxt_conf_map_object(mp, acf->compress, nxt_http_compress_conf,
nxt_nitems(nxt_http_compress_conf), conf);
if (nxt_slow_path(ret == NXT_ERROR)) {