aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2021-01-26 12:39:28 +0300
committerSergey Kandaurov <pluknet@nginx.com>2021-01-26 12:39:28 +0300
commit56f53316837271a8cbb1d99f638e28d268a00d45 (patch)
treeeefa2e71957afaef5f710626f35e6a5e690fd6d4 /src
parent2f008a76f82440d0c10a27b83a0d11ac58249b21 (diff)
downloadnginx-56f53316837271a8cbb1d99f638e28d268a00d45.tar.gz
nginx-56f53316837271a8cbb1d99f638e28d268a00d45.zip
Clean up trailers in ngx_http_clean_header() as well.
The function has not been updated with introduction of trailers support in 7034:1b068a4e82d8 (1.13.2).
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_special_response.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 76e670588..72f56fd9a 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -575,6 +575,10 @@ ngx_http_clean_header(ngx_http_request_t *r)
r->headers_out.headers.part.next = NULL;
r->headers_out.headers.last = &r->headers_out.headers.part;
+ r->headers_out.trailers.part.nelts = 0;
+ r->headers_out.trailers.part.next = NULL;
+ r->headers_out.trailers.last = &r->headers_out.trailers.part;
+
r->headers_out.content_length_n = -1;
r->headers_out.last_modified_time = -1;
}