]> git.kaiwu.me - nginx.git/commitdiff
Disabled multiple Transfer-Encoding headers.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 20 Feb 2020 13:19:29 +0000 (16:19 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 20 Feb 2020 13:19:29 +0000 (16:19 +0300)
We anyway do not support more than one transfer encoding, so accepting
requests with multiple Transfer-Encoding headers doesn't make sense.
Further, we do not handle multiple headers, and ignore anything but
the first header.

Reported by Filippo Valsorda.

src/http/ngx_http_request.c

index 80c19656f964cbbf33527ebc47f10fa92629f28b..85c9803787a0820563c2c16afd0721a3778d7f20 100644 (file)
@@ -131,7 +131,7 @@ ngx_http_header_t  ngx_http_headers_in[] = {
 
     { ngx_string("Transfer-Encoding"),
                  offsetof(ngx_http_headers_in_t, transfer_encoding),
-                 ngx_http_process_header_line },
+                 ngx_http_process_unique_header_line },
 
     { ngx_string("TE"),
                  offsetof(ngx_http_headers_in_t, te),