summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http.h
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2024-06-11 17:59:00 +0800
committerZhidao HONG <z.hong@f5.com>2024-06-20 10:39:55 +0800
commit64f4c78bf441fa9e021d905a03d374d0a9e05e8d (patch)
treee4d12f7eb8a085ae8f58f313a98c761d6594660a /src/nxt_http.h
parentf80a36a60d61ecd5621d33af37aed35fd074f982 (diff)
downloadunit-64f4c78bf441fa9e021d905a03d374d0a9e05e8d.tar.gz
unit-64f4c78bf441fa9e021d905a03d374d0a9e05e8d.tar.bz2
http: Support chunked request bodies
This is a temporary support for chunked request bodies by converting to Content-Length. This allows for processing of such requests until a more permanent solution is developed. A new configuration option "chunked_transform" has been added to enable this feature. The option can be set as follows: { "settings": { "chunked_transform": true } } By default, this option is set to false, which retains the current behaviour of rejecting chunked requests with a '411 Length Required' status code. Please note that this is an experimental implementation. Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r--src/nxt_http.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_http.h b/src/nxt_http.h
index 5fab5c67..fe5e72a8 100644
--- a/src/nxt_http.h
+++ b/src/nxt_http.h
@@ -157,6 +157,7 @@ struct nxt_http_request_s {
nxt_list_t *fields;
nxt_http_field_t *content_type;
nxt_http_field_t *content_length;
+ nxt_http_field_t *chunked_field;
nxt_http_field_t *cookie;
nxt_http_field_t *referer;
nxt_http_field_t *user_agent;
@@ -204,6 +205,7 @@ struct nxt_http_request_s {
uint8_t inconsistent; /* 1 bit */
uint8_t error; /* 1 bit */
uint8_t websocket_handshake; /* 1 bit */
+ uint8_t chunked; /* 1 bit */
};