summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_parse.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_http_parse.h16
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;