comparison src/http/modules/ngx_http_scgi_module.c @ 4015:e0a435f5f504

Fix ignored headers handling in fastcgi/scgi/uwsgi. The bug had appeared in r3561 (fastcgi), r3638 (scgi), r3567 (uwsgi).
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 19 Aug 2011 20:11:39 +0000
parents 215fe9223419
children 9d59a8eda373
comparison
equal deleted inserted replaced
4014:234907e676a5 4015:e0a435f5f504
559 559
560 allocated = 0; 560 allocated = 0;
561 lowcase_key = NULL; 561 lowcase_key = NULL;
562 562
563 if (scf->header_params) { 563 if (scf->header_params) {
564 ignored = ngx_palloc(r->pool, scf->header_params * sizeof(void *)); 564 n = 0;
565 part = &r->headers_in.headers.part;
566
567 while (part) {
568 n += part->nelts;
569 part = part->next;
570 }
571
572 ignored = ngx_palloc(r->pool, n * sizeof(void *));
565 if (ignored == NULL) { 573 if (ignored == NULL) {
566 return NGX_ERROR; 574 return NGX_ERROR;
567 } 575 }
568 } 576 }
569 577