mirror of
https://github.com/nginx/nginx.git
synced 2024-12-26 08:51:03 -06:00
Fix ignored headers handling in fastcgi/scgi/uwsgi.
The bug had appeared in r3561 (fastcgi), r3638 (scgi), r3567 (uwsgi).
This commit is contained in:
parent
79a12b64f1
commit
5a52d67a08
@ -737,7 +737,15 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
|
||||
lowcase_key = NULL;
|
||||
|
||||
if (flcf->header_params) {
|
||||
ignored = ngx_palloc(r->pool, flcf->header_params * sizeof(void *));
|
||||
n = 0;
|
||||
part = &r->headers_in.headers.part;
|
||||
|
||||
while (part) {
|
||||
n += part->nelts;
|
||||
part = part->next;
|
||||
}
|
||||
|
||||
ignored = ngx_palloc(r->pool, n * sizeof(void *));
|
||||
if (ignored == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
@ -561,7 +561,15 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
|
||||
lowcase_key = NULL;
|
||||
|
||||
if (scf->header_params) {
|
||||
ignored = ngx_palloc(r->pool, scf->header_params * sizeof(void *));
|
||||
n = 0;
|
||||
part = &r->headers_in.headers.part;
|
||||
|
||||
while (part) {
|
||||
n += part->nelts;
|
||||
part = part->next;
|
||||
}
|
||||
|
||||
ignored = ngx_palloc(r->pool, n * sizeof(void *));
|
||||
if (ignored == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
@ -589,7 +589,15 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
|
||||
lowcase_key = NULL;
|
||||
|
||||
if (uwcf->header_params) {
|
||||
ignored = ngx_palloc(r->pool, uwcf->header_params * sizeof(void *));
|
||||
n = 0;
|
||||
part = &r->headers_in.headers.part;
|
||||
|
||||
while (part) {
|
||||
n += part->nelts;
|
||||
part = part->next;
|
||||
}
|
||||
|
||||
ignored = ngx_palloc(r->pool, n * sizeof(void *));
|
||||
if (ignored == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user