/unit/src/ |
H A D | nxt_djb_hash.c | 13 uint32_t hash; in nxt_djb_hash() local 17 hash = NXT_DJB_HASH_INIT; in nxt_djb_hash() 20 hash = nxt_djb_hash_add(hash, *p++); in nxt_djb_hash() 24 return hash; in nxt_djb_hash() 32 uint32_t hash; in nxt_djb_hash_lowcase() local 36 hash = NXT_DJB_HASH_INIT; in nxt_djb_hash_lowcase() 40 hash = nxt_djb_hash_add(hash, nxt_lowcase(c)); in nxt_djb_hash_lowcase() 44 return hash; in nxt_djb_hash_lowcase()
|
H A D | nxt_djb_hash.h | 21 #define nxt_djb_hash_add(hash, val) \ argument 22 ((uint32_t) ((((hash) << 5) + (hash)) ^ (uint32_t) (val)))
|
H A D | nxt_http_parse.h | 88 uint16_t hash; member 123 nxt_int_t nxt_http_fields_hash(nxt_lvlhsh_t *hash, 125 nxt_uint_t nxt_http_fields_hash_collisions(nxt_lvlhsh_t *hash, 127 nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, 138 nxt_http_field_process(nxt_http_field_t *field, nxt_lvlhsh_t *hash, void *ctx) in nxt_http_field_process() argument 145 lhq.key_hash = field->hash; in nxt_http_field_process() 149 if (nxt_lvlhsh_find(hash, &lhq) != NXT_OK) { in nxt_http_field_process()
|
H A D | nxt_http_request.c | 879 uint32_t hash; in nxt_http_arguments_parse() local 959 hash = nxt_http_field_hash_char(hash, *dst); in nxt_http_arguments_parse() 990 nv->hash = nxt_http_field_hash_end(hash) & 0xFFFF; in nxt_http_argument() 1098 uint32_t hash; in nxt_http_cookie() local 1113 hash = nxt_http_field_hash_char(hash, c); in nxt_http_cookie() 1116 nv->hash = nxt_http_field_hash_end(hash) & 0xFFFF; in nxt_http_cookie() 1133 uint32_t hash; in nxt_http_field_hash() local 1154 hash = nxt_http_field_hash_char(hash, c); in nxt_http_field_hash() 1197 hash = nxt_http_field_hash_char(hash, c); in nxt_http_field_hash() 1221 uint32_t i, hash; in nxt_http_header_hash() local [all …]
|
H A D | nxt_var.c | 56 uint32_t hash); 118 int64_t hash; in nxt_var_decl_get() local 151 hash = decl->field_hash(fields->mem_pool, &str); in nxt_var_decl_get() 152 if (nxt_slow_path(hash == -1)) { in nxt_var_decl_get() 156 f = nxt_var_field_add(fields, &str, (uint32_t) hash); in nxt_var_decl_get() 180 nxt_var_field_add(nxt_array_t *fields, nxt_str_t *name, uint32_t hash) in nxt_var_field_add() argument 188 if (field[i].hash == hash in nxt_var_field_add() 201 field->hash = hash; in nxt_var_field_add() 259 ret = nxt_lvlhsh_insert(&cache->hash, &lhq); in nxt_var_cache_value()
|
H A D | nxt_var.h | 30 uint16_t hash; member 37 nxt_lvlhsh_t hash; member
|
H A D | nxt_http_parse.c | 524 uint32_t hash; in nxt_http_parse_field_name() local 542 hash = rp->field_hash; in nxt_http_parse_field_name() 560 hash = nxt_http_field_hash_char(hash, c); in nxt_http_parse_field_name() 587 rp->field_hash = hash; in nxt_http_parse_field_name() 607 rp->field_hash = hash; in nxt_http_parse_field_name() 804 field->hash = nxt_http_field_hash_end(rp->field_hash); in nxt_http_parse_field_end() 1180 nxt_http_fields_hash(nxt_lvlhsh_t *hash, in nxt_http_fields_hash() argument 1206 ret = nxt_lvlhsh_insert(hash, &lhq); in nxt_http_fields_hash() 1218 nxt_http_fields_hash_collisions(nxt_lvlhsh_t *hash, in nxt_http_fields_hash_collisions() argument 1250 if (nxt_lvlhsh_insert(hash, &lhq) == NXT_DECLINED) { in nxt_http_fields_hash_collisions() [all …]
|
H A D | nxt_unit_field.h | 23 uint16_t hash; member
|
H A D | nxt_http_variables.c | 393 if (vf->hash == nv->hash in nxt_http_var_arg() 428 if (vf->hash == f->hash in nxt_http_var_header() 471 if (vf->hash == nv->hash in nxt_http_var_cookie()
|
H A D | nxt_http.h | 208 uint16_t hash; member 393 nxt_int_t nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash); 394 nxt_int_t nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash, 396 nxt_str_t *nxt_http_static_mtype_get(nxt_lvlhsh_t *hash,
|
H A D | nxt_http_route.c | 83 uint16_t hash; member 101 uint16_t hash; member 789 int64_t hash; in nxt_http_route_rule_name_create() local 799 hash = nxt_http_field_hash(mp, name, case_sensitive, encoding); in nxt_http_route_rule_name_create() 800 if (nxt_slow_path(hash == -1)) { in nxt_http_route_rule_name_create() 804 rule->u.name.hash = hash; in nxt_http_route_rule_name_create() 1911 if (rule->u.name.hash != f->hash in nxt_http_route_header() 1962 if (rule->u.name.hash == nv->hash in nxt_http_route_test_argument() 2040 if (rule->u.name.hash == nv->hash in nxt_http_route_test_cookie()
|
H A D | nxt_http_static.c | 934 nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash) in nxt_http_static_mtypes_init() argument 1012 ret = nxt_http_static_mtypes_hash_add(mp, hash, &exten, type); in nxt_http_static_mtypes_init() 1039 nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash, in nxt_http_static_mtypes_hash_add() argument 1060 return nxt_lvlhsh_insert(hash, &lhq); in nxt_http_static_mtypes_hash_add() 1065 nxt_http_static_mtype_get(nxt_lvlhsh_t *hash, const nxt_str_t *exten) in nxt_http_static_mtype_get() argument 1076 if (nxt_lvlhsh_find(hash, &lhq) == NXT_OK) { in nxt_http_static_mtype_get()
|
H A D | nxt_unit.c | 1926 uint32_t hash; in nxt_unit_field_hash() local 1934 hash = (hash << 4) + hash + nxt_lowcase(ch); in nxt_unit_field_hash() 1937 hash = (hash >> 16) ^ hash; in nxt_unit_field_hash() 1939 return hash; in nxt_unit_field_hash() 1963 switch (fields[i].hash) { in nxt_unit_request_group_dup_fields() 1996 if (fields[i].hash != fields[j].hash in nxt_unit_request_group_dup_fields() 2179 f->hash = src->hash; in nxt_unit_response_realloc() 6398 if (nxt_fast_path(port_id->hash != 0)) { in nxt_unit_port_hash_lhq() 6399 lhq->key_hash = port_id->hash; in nxt_unit_port_hash_lhq() 6404 port_id->hash = lhq->key_hash; in nxt_unit_port_hash_lhq() [all …]
|
H A D | nxt_unit.h | 70 uint32_t hash; member
|
H A D | nxt_router.c | 2429 uint32_t hash; in nxt_router_conf_forward_header() local 2439 hash = NXT_HTTP_FIELD_HASH_INIT; in nxt_router_conf_forward_header() 2443 hash = nxt_http_field_hash_char(hash, nxt_lowcase(c)); in nxt_router_conf_forward_header() 2446 hash = nxt_http_field_hash_end(hash) & 0xFFFF; in nxt_router_conf_forward_header() 2448 fh->header_hash = hash; in nxt_router_conf_forward_header() 4144 field->hash = f->hash; in nxt_router_response_ready_handler() 5526 dst_field->hash = field->hash; in nxt_router_prepare_msg() 5545 (int) field->hash, (int) field->skip, in nxt_router_prepare_msg() 5589 || dup->hash != field->hash in nxt_router_prepare_msg()
|
H A D | nxt_conf.c | 1490 nxt_lvlhsh_t hash; in nxt_conf_json_parse_object() local 1500 nxt_lvlhsh_init(&hash); in nxt_conf_json_parse_object() 1547 rc = nxt_conf_object_hash_add(mp_temp, &hash, member); in nxt_conf_json_parse_object() 1643 element = nxt_lvlhsh_each(&hash, &lhe); in nxt_conf_json_parse_object()
|
H A D | nxt_conf_validation.c | 1481 nxt_lvlhsh_t hash; member 1497 nxt_lvlhsh_init(&ctx.hash); in nxt_conf_vldt_mtypes() 1566 dup_type = nxt_http_static_mtype_get(&ctx->hash, &exten); in nxt_conf_vldt_mtypes_extension() 1575 return nxt_http_static_mtypes_hash_add(ctx->pool, &ctx->hash, &exten, in nxt_conf_vldt_mtypes_extension()
|
/unit/src/java/ |
H A D | nxt_jni_HeaderNamesEnumeration.c | 101 && f[pos].hash == f[pos - 1].hash in nxt_java_HeaderNamesEnumeration_nextElementPos() 124 && f[pos].hash == f[pos - 1].hash in nxt_java_HeaderNamesEnumeration_nextElement()
|
H A D | nxt_jni_HeadersEnumeration.c | 103 if (f->hash != init_field->hash in nxt_java_HeadersEnumeration_nextElementPos() 138 if (f->hash != init_field->hash in nxt_java_HeadersEnumeration_nextElement()
|
H A D | nxt_jni_Response.c | 399 f->hash = nxt_unit_field_hash(name, name_len); in nxt_java_add_int_header()
|
/unit/src/test/ |
H A D | nxt_http_parse_test.c | 53 nxt_str_t *request, nxt_lvlhsh_t *hash, const char *name, nxt_uint_t n); 534 nxt_lvlhsh_t hash; in nxt_http_parse_test() local 587 nxt_memzero(&hash, sizeof(nxt_lvlhsh_t)); in nxt_http_parse_test() 589 colls = nxt_http_fields_hash_collisions(&hash, in nxt_http_parse_test() 594 nxt_memzero(&hash, sizeof(nxt_lvlhsh_t)); in nxt_http_parse_test() 596 lvl_colls = nxt_http_fields_hash_collisions(&hash, in nxt_http_parse_test() 605 nxt_memzero(&hash, sizeof(nxt_lvlhsh_t)); in nxt_http_parse_test() 607 rc = nxt_http_fields_hash(&hash, nxt_http_test_bench_fields, in nxt_http_parse_test() 614 &hash, "simple", 1000000) in nxt_http_parse_test() 621 &hash, "big", 100000) in nxt_http_parse_test() [all …]
|
/unit/src/nodejs/unit-http/ |
H A D | unit.cpp | 790 uint16_t hash; in response_send_headers() local 848 hash = nxt_unit_field_hash(name_ptr, name_len); in response_send_headers() 873 f->hash = hash; in response_send_headers() 899 f->hash = hash; in response_send_headers()
|
/unit/src/python/ |
H A D | nxt_python_wsgi.c | 666 if (f2->hash != f->hash in nxt_python_get_environ() 1081 if (pctx->req->response->fields[i].hash == NXT_UNIT_HASH_CONTENT_LENGTH) { in nxt_python_response_add_field()
|
H A D | nxt_python_asgi.c | 781 if (f->hash == NXT_UNIT_HASH_WS_PROTOCOL in nxt_py_asgi_create_http_scope() 1330 if (req->response->fields[i].hash == NXT_UNIT_HASH_CONTENT_LENGTH) { in nxt_py_asgi_add_field()
|