17,18c17,18
< u_char str[8];
< uint64_t ui64;
---
> u_char str[8];
> uint64_t ui64;
41,44c41,42
< union {
< uint8_t str[32];
< uint64_t ui64[4];
< } field_key;
---
> nxt_list_t *fields;
> nxt_mp_t *mem_pool;
49c47
< nxt_http_fields_hash_t *fields_hash;
---
> uint32_t field_hash;
51,53d48
< nxt_list_t *fields;
< nxt_mp_t *mem_pool;
<
67c62
< nxt_log_t *log);
---
> uintptr_t data);
74c69
< } nxt_http_fields_hash_entry_t;
---
> } nxt_http_field_proc_t;
78,81c73,78
< nxt_str_t name;
< nxt_str_t value;
< nxt_http_field_handler_t handler;
< uintptr_t data;
---
> uint16_t hash;
> uint8_t skip; /* 1 bit */
> uint8_t name_length;
> uint32_t value_length;
> u_char *name;
> u_char *value;
85,98c82,83
< nxt_inline nxt_int_t
< nxt_http_parse_request_init(nxt_http_request_parse_t *rp, nxt_mp_t *mp)
< {
< rp->mem_pool = mp;
<
< rp->fields = nxt_list_create(mp, 8, sizeof(nxt_http_field_t));
< if (nxt_slow_path(rp->fields == NULL)){
< return NXT_ERROR;
< }
<
< return NXT_OK;
< }
<
<
---
> nxt_int_t nxt_http_parse_request_init(nxt_http_request_parse_t *rp,
> nxt_mp_t *mp);
102,105c87,92
< nxt_http_fields_hash_t *nxt_http_fields_hash_create(
< nxt_http_fields_hash_entry_t *entries, nxt_mp_t *mp);
< nxt_int_t nxt_http_fields_process(nxt_list_t *fields, void *ctx,
< nxt_log_t *log);
---
> nxt_int_t nxt_http_fields_hash(nxt_lvlhsh_t *hash, nxt_mp_t *mp,
> nxt_http_field_proc_t items[], nxt_uint_t count);
> nxt_uint_t nxt_http_fields_hash_collisions(nxt_lvlhsh_t *hash, nxt_mp_t *mp,
> nxt_http_field_proc_t items[], nxt_uint_t count, nxt_bool_t level);
> nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash,
> void *ctx);