comparison src/core/ngx_hash.h @ 8020:f8f6b9fee66a

FastCGI: combining headers with identical names (ticket #1724). FastCGI responder is expected to receive CGI/1.1 environment variables in the parameters (see section "6.2 Responder" of the FastCGI specification). Obviously enough, there cannot be multiple environment variables with the same name. Further, CGI specification (RFC 3875, section "4.1.18. Protocol-Specific Meta-Variables") explicitly requires to combine headers: "If multiple header fields with the same field-name are received then the server MUST rewrite them as a single value having the same semantics".
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 30 May 2022 21:25:27 +0300
parents d620f497c50f
children
comparison
equal deleted inserted replaced
8019:0e562a332529 8020:f8f6b9fee66a
87 ngx_array_t dns_wc_tail; 87 ngx_array_t dns_wc_tail;
88 ngx_array_t *dns_wc_tail_hash; 88 ngx_array_t *dns_wc_tail_hash;
89 } ngx_hash_keys_arrays_t; 89 } ngx_hash_keys_arrays_t;
90 90
91 91
92 typedef struct { 92 typedef struct ngx_table_elt_s ngx_table_elt_t;
93
94 struct ngx_table_elt_s {
93 ngx_uint_t hash; 95 ngx_uint_t hash;
94 ngx_str_t key; 96 ngx_str_t key;
95 ngx_str_t value; 97 ngx_str_t value;
96 u_char *lowcase_key; 98 u_char *lowcase_key;
97 } ngx_table_elt_t; 99 ngx_table_elt_t *next;
100 };
98 101
99 102
100 void *ngx_hash_find(ngx_hash_t *hash, ngx_uint_t key, u_char *name, size_t len); 103 void *ngx_hash_find(ngx_hash_t *hash, ngx_uint_t key, u_char *name, size_t len);
101 void *ngx_hash_find_wc_head(ngx_hash_wildcard_t *hwc, u_char *name, size_t len); 104 void *ngx_hash_find_wc_head(ngx_hash_wildcard_t *hwc, u_char *name, size_t len);
102 void *ngx_hash_find_wc_tail(ngx_hash_wildcard_t *hwc, u_char *name, size_t len); 105 void *ngx_hash_find_wc_tail(ngx_hash_wildcard_t *hwc, u_char *name, size_t len);