Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:46 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:46 +0300
commit268f0cba8887ba77b6a2c97a8732df2784fe6001 (patch)
tree128ba0bfd69f7e0820575831c4fe86c5990d8780
parente59c2096ae9d561997ad2d64d61094503e6be4c3 (diff)
Upstream: all known headers in u->headers_in are linked lists now.
-rw-r--r--src/http/modules/ngx_http_proxy_module.c2
-rw-r--r--src/http/ngx_http_upstream.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 644dacd51..20b11097d 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1965,6 +1965,7 @@ ngx_http_proxy_process_header(ngx_http_request_t *r)
ngx_str_set(&h->key, "Server");
ngx_str_null(&h->value);
h->lowcase_key = (u_char *) "server";
+ h->next = NULL;
}
if (r->upstream->headers_in.date == NULL) {
@@ -1978,6 +1979,7 @@ ngx_http_proxy_process_header(ngx_http_request_t *r)
ngx_str_set(&h->key, "Date");
ngx_str_null(&h->value);
h->lowcase_key = (u_char *) "date";
+ h->next = NULL;
}
/* clear content length if response is chunked */
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 73936f714..a111de826 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -4610,6 +4610,7 @@ ngx_http_upstream_process_header_line(ngx_http_request_t *r, ngx_table_elt_t *h,
if (*ph == NULL) {
*ph = h;
+ h->next = NULL;
}
return NGX_OK;
@@ -4632,6 +4633,7 @@ ngx_http_upstream_process_content_length(ngx_http_request_t *r,
u = r->upstream;
+ h->next = NULL;
u->headers_in.content_length = h;
u->headers_in.content_length_n = ngx_atoof(h->value.data, h->value.len);
@@ -4647,6 +4649,7 @@ ngx_http_upstream_process_last_modified(ngx_http_request_t *r,
u = r->upstream;
+ h->next = NULL;
u->headers_in.last_modified = h;
u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data,
h->value.len);
@@ -4816,6 +4819,7 @@ ngx_http_upstream_process_expires(ngx_http_request_t *r, ngx_table_elt_t *h,
u = r->upstream;
u->headers_in.expires = h;
+ h->next = NULL;
#if (NGX_HTTP_CACHE)
{
@@ -4856,6 +4860,7 @@ ngx_http_upstream_process_accel_expires(ngx_http_request_t *r,
u = r->upstream;
u->headers_in.x_accel_expires = h;
+ h->next = NULL;
#if (NGX_HTTP_CACHE)
{
@@ -4915,6 +4920,7 @@ ngx_http_upstream_process_limit_rate(ngx_http_request_t *r, ngx_table_elt_t *h,
u = r->upstream;
u->headers_in.x_accel_limit_rate = h;
+ h->next = NULL;
if (u->conf->ignore_headers & NGX_HTTP_UPSTREAM_IGN_XA_LIMIT_RATE) {
return NGX_OK;
@@ -4995,6 +5001,7 @@ ngx_http_upstream_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h,
u = r->upstream;
u->headers_in.connection = h;
+ h->next = NULL;
if (ngx_strlcasestrn(h->value.data, h->value.data + h->value.len,
(u_char *) "close", 5 - 1)
@@ -5015,6 +5022,7 @@ ngx_http_upstream_process_transfer_encoding(ngx_http_request_t *r,
u = r->upstream;
u->headers_in.transfer_encoding = h;
+ h->next = NULL;
if (ngx_strlcasestrn(h->value.data, h->value.data + h->value.len,
(u_char *) "chunked", 7 - 1)
@@ -5035,6 +5043,7 @@ ngx_http_upstream_process_vary(ngx_http_request_t *r,
u = r->upstream;
u->headers_in.vary = h;
+ h->next = NULL;
#if (NGX_HTTP_CACHE)