summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:27 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:27 +0300
commitd8a7c653e4b8e842c947c0a550a7bc5a7812058a (patch)
treecf35530032c5eea4e7cd15fb893fe9ddd0e46730 /src/core
parent8ad0f62863aaa7ed64b4514c4c1d3ba924410c16 (diff)
downloadnginx-d8a7c653e4b8e842c947c0a550a7bc5a7812058a.tar.gz
nginx-d8a7c653e4b8e842c947c0a550a7bc5a7812058a.tar.bz2
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".
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_hash.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ngx_hash.h b/src/core/ngx_hash.h
index abc3cbe5d..3b5709928 100644
--- a/src/core/ngx_hash.h
+++ b/src/core/ngx_hash.h
@@ -89,12 +89,15 @@ typedef struct {
} ngx_hash_keys_arrays_t;
-typedef struct {
+typedef struct ngx_table_elt_s ngx_table_elt_t;
+
+struct ngx_table_elt_s {
ngx_uint_t hash;
ngx_str_t key;
ngx_str_t value;
u_char *lowcase_key;
-} ngx_table_elt_t;
+ ngx_table_elt_t *next;
+};
void *ngx_hash_find(ngx_hash_t *hash, ngx_uint_t key, u_char *name, size_t len);