diff options
author | Andrei Belov <defan@nginx.com> | 2020-08-13 19:28:27 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2020-08-13 19:28:27 +0300 |
commit | aff76e4f90b4e948c327ce2b021dc3203c33cbcd (patch) | |
tree | 5bd6ac3aa92683777548472984c209bf26d8a971 /src/nxt_http_parse.h | |
parent | 04ce9f997e0e49e57ce4b5fc4aa98134232a1974 (diff) | |
parent | 6473d4b65a99aa10d509220fb99d8c4f65631ed0 (diff) | |
download | unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.gz unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.bz2 |
Merged with the default branch.1.19.0-1
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_parse.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index 0f888949..cbfc8433 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -90,6 +90,19 @@ struct nxt_http_field_s { }; +typedef struct { + u_char *pos; + nxt_mp_t *mem_pool; + + uint64_t chunk_size; + + uint8_t state; + uint8_t last; /* 1 bit */ + uint8_t chunk_error; /* 1 bit */ + uint8_t error; /* 1 bit */ +} nxt_http_chunk_parse_t; + + #define NXT_HTTP_FIELD_HASH_INIT 159406U #define nxt_http_field_hash_char(h, c) (((h) << 4) + (h) + (c)) #define nxt_http_field_hash_end(h) (((h) >> 16) ^ (h)) @@ -109,6 +122,9 @@ nxt_uint_t nxt_http_fields_hash_collisions(nxt_lvlhsh_t *hash, nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, void *ctx); +nxt_buf_t *nxt_http_chunk_parse(nxt_task_t *task, nxt_http_chunk_parse_t *hcp, + nxt_buf_t *in); + extern const nxt_lvlhsh_proto_t nxt_http_fields_hash_proto; |