Deleted
Added
nxt_http_parse.c (1059:11b44092759d) | nxt_http_parse.c (1126:50a8b6ded8e2) |
---|---|
1 2/* 3 * Copyright (C) NGINX, Inc. 4 * Copyright (C) Valentin V. Bartenev 5 */ 6 7#include <nxt_main.h> 8 --- 1096 unchanged lines hidden (view full) --- 1105 rp->exten.length = u - rp->exten_start; 1106 rp->exten.start = rp->exten_start; 1107 } 1108 1109 return NXT_OK; 1110} 1111 1112 | 1 2/* 3 * Copyright (C) NGINX, Inc. 4 * Copyright (C) Valentin V. Bartenev 5 */ 6 7#include <nxt_main.h> 8 --- 1096 unchanged lines hidden (view full) --- 1105 rp->exten.length = u - rp->exten_start; 1106 rp->exten.start = rp->exten_start; 1107 } 1108 1109 return NXT_OK; 1110} 1111 1112 |
1113static const nxt_lvlhsh_proto_t nxt_http_fields_hash_proto nxt_aligned(64) = { | 1113const nxt_lvlhsh_proto_t nxt_http_fields_hash_proto nxt_aligned(64) = { |
1114 NXT_LVLHSH_BUCKET_SIZE(64), 1115 { NXT_HTTP_FIELD_LVLHSH_SHIFT, 0, 0, 0, 0, 0, 0, 0 }, 1116 nxt_http_field_hash_test, 1117 nxt_http_field_hash_alloc, 1118 nxt_http_field_hash_free, 1119}; 1120 1121 --- 113 unchanged lines hidden (view full) --- 1235 1236 return colls; 1237} 1238 1239 1240nxt_int_t 1241nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, void *ctx) 1242{ | 1114 NXT_LVLHSH_BUCKET_SIZE(64), 1115 { NXT_HTTP_FIELD_LVLHSH_SHIFT, 0, 0, 0, 0, 0, 0, 0 }, 1116 nxt_http_field_hash_test, 1117 nxt_http_field_hash_alloc, 1118 nxt_http_field_hash_free, 1119}; 1120 1121 --- 113 unchanged lines hidden (view full) --- 1235 1236 return colls; 1237} 1238 1239 1240nxt_int_t 1241nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, void *ctx) 1242{ |
1243 nxt_int_t ret; 1244 nxt_http_field_t *field; 1245 nxt_lvlhsh_query_t lhq; 1246 nxt_http_field_proc_t *proc; | 1243 nxt_int_t ret; 1244 nxt_http_field_t *field; |
1247 | 1245 |
1248 lhq.proto = &nxt_http_fields_hash_proto; 1249 | |
1250 nxt_list_each(field, fields) { 1251 | 1246 nxt_list_each(field, fields) { 1247 |
1252 lhq.key_hash = field->hash; 1253 lhq.key.length = field->name_length; 1254 lhq.key.start = field->name; 1255 1256 if (nxt_lvlhsh_find(hash, &lhq) != NXT_OK) { 1257 continue; 1258 } 1259 1260 proc = lhq.value; 1261 1262 ret = proc->handler(ctx, field, proc->data); 1263 | 1248 ret = nxt_http_field_process(field, hash, ctx); |
1264 if (nxt_slow_path(ret != NXT_OK)) { 1265 return ret; 1266 } 1267 1268 } nxt_list_loop; 1269 1270 return NXT_OK; 1271} | 1249 if (nxt_slow_path(ret != NXT_OK)) { 1250 return ret; 1251 } 1252 1253 } nxt_list_loop; 1254 1255 return NXT_OK; 1256} |