Mercurial > hg > nginx-vendor-0-5
comparison src/http/modules/ngx_http_fastcgi_module.c @ 86:962c43960644 NGINX_0_1_43
nginx 0.1.43
*) Feature: the listen(2) backlog in the "listen" directive can be
changed using the -HUP signal.
*) Feature: the geo2nginx.pl script was added to contrib.
*) Change: the FastCGI parameters with the empty values now are passed
to a server.
*) Bugfix: the segmentation fault occurred or the worker process may
got caught in an endless loop if the proxied or FastCGI server sent
the "Cache-Control" header line and the "expires" directive was
used; in the proxied mode the bug appeared in 0.1.29.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 30 Aug 2005 00:00:00 +0400 |
parents | 9db7e0b5b27f |
children | 71c46860eb55 |
comparison
equal
deleted
inserted
replaced
85:ed21d13ec23c | 86:962c43960644 |
---|---|
140 NGX_HTTP_FASTCGI_PARAMS, /* type */ | 140 NGX_HTTP_FASTCGI_PARAMS, /* type */ |
141 0, /* request_id_hi */ | 141 0, /* request_id_hi */ |
142 1 }, /* request_id_lo */ | 142 1 }, /* request_id_lo */ |
143 | 143 |
144 }; | 144 }; |
145 | |
146 | |
147 #if 0 | |
148 static ngx_str_t ngx_http_fastcgi_methods[] = { | |
149 ngx_string("GET"), | |
150 ngx_string("HEAD"), | |
151 ngx_string("POST") | |
152 }; | |
153 #endif | |
154 | 145 |
155 | 146 |
156 static ngx_str_t ngx_http_fastcgi_script_name = | 147 static ngx_str_t ngx_http_fastcgi_script_name = |
157 ngx_string("fastcgi_script_name"); | 148 ngx_string("fastcgi_script_name"); |
158 | 149 |
426 for (val_len = 0; *(uintptr_t *) le.ip; val_len += lcode(&le)) { | 417 for (val_len = 0; *(uintptr_t *) le.ip; val_len += lcode(&le)) { |
427 lcode = *(ngx_http_script_len_code_pt *) le.ip; | 418 lcode = *(ngx_http_script_len_code_pt *) le.ip; |
428 } | 419 } |
429 le.ip += sizeof(uintptr_t); | 420 le.ip += sizeof(uintptr_t); |
430 | 421 |
431 if (val_len) { | 422 len += 1 + key_len + ((val_len > 127) ? 4 : 1) + val_len; |
432 len += 1 + key_len + ((val_len > 127) ? 4 : 1) + val_len; | |
433 } | |
434 } | 423 } |
435 } | 424 } |
436 | 425 |
437 if (flcf->upstream.pass_request_headers) { | 426 if (flcf->upstream.pass_request_headers) { |
438 | 427 |
525 for (val_len = 0; *(uintptr_t *) le.ip; val_len += lcode(&le)) { | 514 for (val_len = 0; *(uintptr_t *) le.ip; val_len += lcode(&le)) { |
526 lcode = *(ngx_http_script_len_code_pt *) le.ip; | 515 lcode = *(ngx_http_script_len_code_pt *) le.ip; |
527 } | 516 } |
528 le.ip += sizeof(uintptr_t); | 517 le.ip += sizeof(uintptr_t); |
529 | 518 |
530 if (val_len) { | 519 *e.pos++ = (u_char) key_len; |
531 *e.pos++ = (u_char) key_len; | 520 |
532 | 521 if (val_len > 127) { |
533 if (val_len > 127) { | 522 *e.pos++ = (u_char) (((val_len >> 24) & 0x7f) | 0x80); |
534 *e.pos++ = (u_char) (((val_len >> 24) & 0x7f) | 0x80); | 523 *e.pos++ = (u_char) ((val_len >> 16) & 0xff); |
535 *e.pos++ = (u_char) ((val_len >> 16) & 0xff); | 524 *e.pos++ = (u_char) ((val_len >> 8) & 0xff); |
536 *e.pos++ = (u_char) ((val_len >> 8) & 0xff); | 525 *e.pos++ = (u_char) (val_len & 0xff); |
537 *e.pos++ = (u_char) (val_len & 0xff); | 526 |
538 | 527 } else { |
539 } else { | 528 *e.pos++ = (u_char) val_len; |
540 *e.pos++ = (u_char) val_len; | 529 } |
541 } | |
542 } | |
543 | |
544 e.skip = val_len ? 0 : 1; | |
545 | 530 |
546 while (*(uintptr_t *) e.ip) { | 531 while (*(uintptr_t *) e.ip) { |
547 code = *(ngx_http_script_code_pt *) e.ip; | 532 code = *(ngx_http_script_code_pt *) e.ip; |
548 code((ngx_http_script_engine_t *) &e); | 533 code((ngx_http_script_engine_t *) &e); |
549 } | 534 } |