Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 27) sorted by relevance

12

/unit/src/
H A Dnxt_djb_hash.c13 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 Dnxt_djb_hash.h21 #define nxt_djb_hash_add(hash, val) \ argument
22 ((uint32_t) ((((hash) << 5) + (hash)) ^ (uint32_t) (val)))
H A Dnxt_http_parse.h87 uint16_t hash; member
122 nxt_int_t nxt_http_fields_hash(nxt_lvlhsh_t *hash,
124 nxt_uint_t nxt_http_fields_hash_collisions(nxt_lvlhsh_t *hash,
126 nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash,
136 nxt_http_field_process(nxt_http_field_t *field, nxt_lvlhsh_t *hash, void *ctx) in nxt_http_field_process() argument
143 lhq.key_hash = field->hash; in nxt_http_field_process()
147 if (nxt_lvlhsh_find(hash, &lhq) != NXT_OK) { in nxt_http_field_process()
H A Dnxt_http_request.c856 uint32_t hash; in nxt_http_arguments_parse() local
936 hash = nxt_http_field_hash_char(hash, *dst); in nxt_http_arguments_parse()
967 nv->hash = nxt_http_field_hash_end(hash) & 0xFFFF; in nxt_http_argument()
1075 uint32_t hash; in nxt_http_cookie() local
1090 hash = nxt_http_field_hash_char(hash, c); in nxt_http_cookie()
1093 nv->hash = nxt_http_field_hash_end(hash) & 0xFFFF; in nxt_http_cookie()
1110 uint32_t hash; in nxt_http_field_hash() local
1131 hash = nxt_http_field_hash_char(hash, c); in nxt_http_field_hash()
1174 hash = nxt_http_field_hash_char(hash, c); in nxt_http_field_hash()
1198 uint32_t i, hash; in nxt_http_header_hash() local
[all …]
H A Dnxt_upstream_source.h12 uint32_t hash; member
25 nxt_lvlhsh_t hash; member
H A Dnxt_var.c58 uint32_t hash);
121 int64_t hash; in nxt_var_decl_get() local
154 hash = decl->field_hash(fields->mem_pool, &str); in nxt_var_decl_get()
155 if (nxt_slow_path(hash == -1)) { in nxt_var_decl_get()
159 f = nxt_var_field_add(fields, &str, (uint32_t) hash); in nxt_var_decl_get()
183 nxt_var_field_add(nxt_array_t *fields, nxt_str_t *name, uint32_t hash) in nxt_var_field_add() argument
191 if (field[i].hash == hash in nxt_var_field_add()
204 field->hash = hash; in nxt_var_field_add()
H A Dnxt_http_parse.c524 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 Dnxt_unit_field.h23 uint16_t hash; member
H A Dnxt_http_variables.c389 if (vf->hash == nv->hash in nxt_http_var_arg()
424 if (vf->hash == f->hash in nxt_http_var_header()
467 if (vf->hash == nv->hash in nxt_http_var_cookie()
H A Dnxt_var.h30 uint16_t hash; member
H A Dnxt_http.h202 uint16_t hash; member
380 nxt_int_t nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash);
381 nxt_int_t nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash,
383 nxt_str_t *nxt_http_static_mtype_get(nxt_lvlhsh_t *hash,
H A Dnxt_http_route.c83 uint16_t hash; member
101 uint16_t hash; member
777 int64_t hash; in nxt_http_route_rule_name_create() local
787 hash = nxt_http_field_hash(mp, name, case_sensitive, encoding); in nxt_http_route_rule_name_create()
788 if (nxt_slow_path(hash == -1)) { in nxt_http_route_rule_name_create()
792 rule->u.name.hash = hash; in nxt_http_route_rule_name_create()
1887 if (rule->u.name.hash != f->hash in nxt_http_route_header()
1938 if (rule->u.name.hash == nv->hash in nxt_http_route_test_argument()
2016 if (rule->u.name.hash == nv->hash in nxt_http_route_test_cookie()
H A Dnxt_http_source.c66 hs->header_in.hash = us->header_hash; in nxt_http_source_handler()
344 nv->hash = hp->header_hash; in nxt_http_source_header_line_process()
355 lhq.key_hash = nv->hash; in nxt_http_source_header_line_process()
360 if (nxt_lvlhsh_find(&hs->header_in.hash, &lhq) == NXT_OK) { in nxt_http_source_header_line_process()
H A Dnxt_fastcgi_source.c140 fs->header_in.hash = us->header_hash; in nxt_fastcgi_source_handler()
567 nv->hash = hp->header_hash; in nxt_fastcgi_source_header_process()
577 lhq.key_hash = nv->hash; in nxt_fastcgi_source_header_process()
582 if (nxt_lvlhsh_find(&fs->header_in.hash, &lhq) == NXT_OK) { in nxt_fastcgi_source_header_process()
H A Dnxt_http_static.c924 nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash) in nxt_http_static_mtypes_init() argument
1002 ret = nxt_http_static_mtypes_hash_add(mp, hash, &exten, type); in nxt_http_static_mtypes_init()
1029 nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash, in nxt_http_static_mtypes_hash_add() argument
1050 return nxt_lvlhsh_insert(hash, &lhq); in nxt_http_static_mtypes_hash_add()
1055 nxt_http_static_mtype_get(nxt_lvlhsh_t *hash, const nxt_str_t *exten) in nxt_http_static_mtype_get() argument
1066 if (nxt_lvlhsh_find(hash, &lhq) == NXT_OK) { in nxt_http_static_mtype_get()
H A Dnxt_unit.c1908 uint32_t hash; in nxt_unit_field_hash() local
1916 hash = (hash << 4) + hash + nxt_lowcase(ch); in nxt_unit_field_hash()
1919 hash = (hash >> 16) ^ hash; in nxt_unit_field_hash()
1921 return hash; in nxt_unit_field_hash()
1945 switch (fields[i].hash) { in nxt_unit_request_group_dup_fields()
1978 if (fields[i].hash != fields[j].hash in nxt_unit_request_group_dup_fields()
2161 f->hash = src->hash; in nxt_unit_response_realloc()
6380 if (nxt_fast_path(port_id->hash != 0)) { in nxt_unit_port_hash_lhq()
6381 lhq->key_hash = port_id->hash; in nxt_unit_port_hash_lhq()
6386 port_id->hash = lhq->key_hash; in nxt_unit_port_hash_lhq()
[all …]
H A Dnxt_unit.h70 uint32_t hash; member
H A Dnxt_router.c2254 uint32_t hash; in nxt_router_conf_forward_header() local
2264 hash = NXT_HTTP_FIELD_HASH_INIT; in nxt_router_conf_forward_header()
2268 hash = nxt_http_field_hash_char(hash, nxt_lowcase(c)); in nxt_router_conf_forward_header()
2271 hash = nxt_http_field_hash_end(hash) & 0xFFFF; in nxt_router_conf_forward_header()
2273 fh->header_hash = hash; in nxt_router_conf_forward_header()
3932 field->hash = f->hash; in nxt_router_response_ready_handler()
5307 dst_field->hash = field->hash; in nxt_router_prepare_msg()
5326 (int) field->hash, (int) field->skip, in nxt_router_prepare_msg()
5370 || dup->hash != field->hash in nxt_router_prepare_msg()
H A Dnxt_conf.c1490 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 Dnxt_conf_validation.c1379 nxt_lvlhsh_t hash; member
1395 nxt_lvlhsh_init(&ctx.hash); in nxt_conf_vldt_mtypes()
1464 dup_type = nxt_http_static_mtype_get(&ctx->hash, &exten); in nxt_conf_vldt_mtypes_extension()
1473 return nxt_http_static_mtypes_hash_add(ctx->pool, &ctx->hash, &exten, in nxt_conf_vldt_mtypes_extension()
/unit/src/java/
H A Dnxt_jni_HeaderNamesEnumeration.c101 && 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 Dnxt_jni_HeadersEnumeration.c103 if (f->hash != init_field->hash in nxt_java_HeadersEnumeration_nextElementPos()
138 if (f->hash != init_field->hash in nxt_java_HeadersEnumeration_nextElement()
/unit/src/test/
H A Dnxt_http_parse_test.c53 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 Dunit.cpp790 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 Dnxt_python_wsgi.c639 if (f2->hash != f->hash in nxt_python_get_environ()
1040 if (pctx->req->response->fields[i].hash == NXT_UNIT_HASH_CONTENT_LENGTH) { in nxt_python_response_add_field()

12