Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 8033:2bf7792c262e
Upstream: header handlers can now return parsing errors.
With this change, duplicate Content-Length and Transfer-Encoding headers
are now rejected. Further, responses with invalid Content-Length or
Transfer-Encoding headers are now rejected, as well as responses with both
Content-Length and Transfer-Encoding.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 30 May 2022 21:25:48 +0300 |
parents | 2025aae94739 |
children | c7e25324be11 |
comparison
equal
deleted
inserted
replaced
8032:2025aae94739 | 8033:2bf7792c262e |
---|---|
1928 } | 1928 } |
1929 | 1929 |
1930 hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, | 1930 hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, |
1931 h->lowcase_key, h->key.len); | 1931 h->lowcase_key, h->key.len); |
1932 | 1932 |
1933 if (hh && hh->handler(r, h, hh->offset) != NGX_OK) { | 1933 if (hh) { |
1934 return NGX_ERROR; | 1934 rc = hh->handler(r, h, hh->offset); |
1935 | |
1936 if (rc != NGX_OK) { | |
1937 return rc; | |
1938 } | |
1935 } | 1939 } |
1936 | 1940 |
1937 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1941 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1938 "http proxy header: \"%V: %V\"", | 1942 "http proxy header: \"%V: %V\"", |
1939 &h->key, &h->value); | 1943 &h->key, &h->value); |