Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 2489:d1a7203a8a44
avoid a double redirect response if
*) a request is going in a keep alive state,
*) the request body should be discarded,
*) epoll/rtsig reports about the response header has been sent,
*) and write event handler calls core phase handler
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 31 Jan 2009 20:44:30 +0000 |
parents | 722b5aff05ae |
children | 2e91aecb9e57 |
comparison
equal
deleted
inserted
replaced
2488:ac695b3e981c | 2489:d1a7203a8a44 |
---|---|
2183 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 2183 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
2184 | 2184 |
2185 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "set http keepalive handler"); | 2185 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "set http keepalive handler"); |
2186 | 2186 |
2187 if (r->discard_body) { | 2187 if (r->discard_body) { |
2188 r->write_event_handler = ngx_http_request_empty_handler; | |
2188 r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000); | 2189 r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000); |
2189 ngx_add_timer(rev, clcf->lingering_timeout); | 2190 ngx_add_timer(rev, clcf->lingering_timeout); |
2190 return; | 2191 return; |
2191 } | 2192 } |
2192 | 2193 |