Mercurial > hg > nginx
diff src/http/modules/ngx_http_scgi_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 | 75af96daee97 |
children | 35bb47f65cab |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_scgi_module.c Mon May 30 21:25:46 2022 +0300 +++ b/src/http/modules/ngx_http_scgi_module.c Mon May 30 21:25:48 2022 +0300 @@ -1114,8 +1114,12 @@ hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, h->lowcase_key, h->key.len); - if (hh && hh->handler(r, h, hh->offset) != NGX_OK) { - return NGX_ERROR; + if (hh) { + rc = hh->handler(r, h, hh->offset); + + if (rc != NGX_OK) { + return rc; + } } ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,