From e5035397b01ec12f351a6a984f83091b821978cc Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 30 Aug 2005 10:55:07 +0000 Subject: nginx-0.1.43-RELEASE import *) 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 the bug had appeared in 0.1.29. --- src/http/ngx_http_request.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index c6a580948..b8e97d2a7 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -637,8 +637,24 @@ ngx_http_process_request_line(ngx_event_t *rev) "http exten: \"%V\"", &r->exten); if (r->http_version < NGX_HTTP_VERSION_10) { + + if (rev->timer_set) { + ngx_del_timer(rev); + } + +#if (NGX_STAT_STUB) + ngx_atomic_dec(ngx_stat_reading); + r->stat_reading = 0; + ngx_atomic_inc(ngx_stat_writing); + r->stat_writing = 1; +#endif + + rev->handler = ngx_http_request_handler; + c->write->handler = ngx_http_request_handler; r->read_event_handler = ngx_http_block_read; + ngx_http_handler(r); + return; } @@ -868,6 +884,7 @@ ngx_http_process_request_headers(ngx_event_t *rev) r->read_event_handler = ngx_http_block_read; ngx_http_handler(r); + return; } @@ -1783,6 +1800,8 @@ ngx_http_discard_body(ngx_http_request_t *r) return NGX_OK; } + r->discard_body = 1; + size = r->header_in->last - r->header_in->pos; if (size) { -- cgit v1.2.3