Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
8032:2025aae94739 | 8033:2bf7792c262e |
---|---|
1112 } | 1112 } |
1113 | 1113 |
1114 hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, | 1114 hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, |
1115 h->lowcase_key, h->key.len); | 1115 h->lowcase_key, h->key.len); |
1116 | 1116 |
1117 if (hh && hh->handler(r, h, hh->offset) != NGX_OK) { | 1117 if (hh) { |
1118 return NGX_ERROR; | 1118 rc = hh->handler(r, h, hh->offset); |
1119 | |
1120 if (rc != NGX_OK) { | |
1121 return rc; | |
1122 } | |
1119 } | 1123 } |
1120 | 1124 |
1121 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1125 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1122 "http scgi header: \"%V: %V\"", &h->key, &h->value); | 1126 "http scgi header: \"%V: %V\"", &h->key, &h->value); |
1123 | 1127 |