Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 7626:fe5976aae0e3
Removed "Transfer-Encoding: identity" support.
The "identity" transfer coding has been removed in RFC 7230. It is
believed that it is not used in real life, and at the same time it
provides a potential attack vector.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 20 Feb 2020 16:19:34 +0300 |
parents | aca005d232ff |
children | 4f18393a1d51 |
comparison
equal
deleted
inserted
replaced
7625:aca005d232ff | 7626:fe5976aae0e3 |
---|---|
1950 { | 1950 { |
1951 r->headers_in.content_length = NULL; | 1951 r->headers_in.content_length = NULL; |
1952 r->headers_in.content_length_n = -1; | 1952 r->headers_in.content_length_n = -1; |
1953 r->headers_in.chunked = 1; | 1953 r->headers_in.chunked = 1; |
1954 | 1954 |
1955 } else if (r->headers_in.transfer_encoding->value.len != 8 | 1955 } else { |
1956 || ngx_strncasecmp(r->headers_in.transfer_encoding->value.data, | |
1957 (u_char *) "identity", 8) != 0) | |
1958 { | |
1959 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 1956 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
1960 "client sent unknown \"Transfer-Encoding\": \"%V\"", | 1957 "client sent unknown \"Transfer-Encoding\": \"%V\"", |
1961 &r->headers_in.transfer_encoding->value); | 1958 &r->headers_in.transfer_encoding->value); |
1962 ngx_http_finalize_request(r, NGX_HTTP_NOT_IMPLEMENTED); | 1959 ngx_http_finalize_request(r, NGX_HTTP_NOT_IMPLEMENTED); |
1963 return NGX_ERROR; | 1960 return NGX_ERROR; |