diff options
author | Alejandro Colomar <alx@nginx.com> | 2023-07-19 14:22:21 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@nginx.com> | 2023-09-03 18:38:05 +0200 |
commit | 6e164a368b4aea80233b17486fe549ab70816e86 (patch) | |
tree | 266cc6f1d60162771c0c60b9055f1241199acf3e /src/nxt_http_compress.h | |
parent | 4977d280cacc7dd2bbbd61a00d133574f18cb118 (diff) | |
download | unit-6e164a368b4aea80233b17486fe549ab70816e86.tar.gz unit-6e164a368b4aea80233b17486fe549ab70816e86.tar.bz2 |
HTTP: compress: added "compress" action.
There are still no supported encodings. This is just infrastructure for
the next commits, which will add gzip compression.
Signed-off-by: Alejandro Colomar <alx@nginx.com>
Diffstat (limited to 'src/nxt_http_compress.h')
-rw-r--r-- | src/nxt_http_compress.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/nxt_http_compress.h b/src/nxt_http_compress.h new file mode 100644 index 00000000..57bebd1c --- /dev/null +++ b/src/nxt_http_compress.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) Alejandro Colomar + * Copyright (C) NGINX, Inc. + */ + +#ifndef NXT_HTTP_COMPRESS_H_INCLUDED_ +#define NXT_HTTP_COMPRESS_H_INCLUDED_ + + +#include "nxt_router.h" + +#include "nxt_http.h" +#include "nxt_main.h" +#include "nxt_router.h" +#include "nxt_string.h" +#include "nxt_types.h" + + +struct nxt_http_compress_conf_s { + 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 nxt_http_compress_init(nxt_router_conf_t *rtcf, + nxt_http_action_t *action, nxt_http_action_conf_t *acf); + +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); + + +#endif /* NXT_HTTP_COMPRESS_H_INCLUDED_ */ |