comparison src/http/ngx_http_request.c @ 3985:07d1aa82899b

always set timer in discard body handler, this fixes the cases when request for static file is redirected by error_page to an SSI page patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Aug 2011 13:52:54 +0000
parents 3e51832c8215
children 4e1a489c26cd
comparison
equal deleted inserted replaced
3984:3e51832c8215 3985:07d1aa82899b
2121 2121
2122 if (r->main->count != 1) { 2122 if (r->main->count != 1) {
2123 2123
2124 if (r->discard_body) { 2124 if (r->discard_body) {
2125 r->read_event_handler = ngx_http_discarded_request_body_handler; 2125 r->read_event_handler = ngx_http_discarded_request_body_handler;
2126 ngx_add_timer(r->connection->read, clcf->lingering_timeout);
2126 2127
2127 if (r->lingering_time == 0) { 2128 if (r->lingering_time == 0) {
2128 r->lingering_time = ngx_time() 2129 r->lingering_time = ngx_time()
2129 + (time_t) (clcf->lingering_time / 1000); 2130 + (time_t) (clcf->lingering_time / 1000);
2130 ngx_add_timer(r->connection->read, clcf->lingering_timeout);
2131 } 2131 }
2132 } 2132 }
2133 2133
2134 ngx_http_close_request(r, 0); 2134 ngx_http_close_request(r, 0);
2135 return; 2135 return;