aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-01-31 20:44:30 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-01-31 20:44:30 +0000
commit32856e1bc859d9765cb3daa2ff928b8ec8ba0f13 (patch)
tree55f98ed2d3383c03d433e949c92756d4eab50af0 /src/http/ngx_http_request.c
parentbd5c23ee0a5e47ee85432023baab7e02a75caee0 (diff)
downloadnginx-32856e1bc859d9765cb3daa2ff928b8ec8ba0f13.tar.gz
nginx-32856e1bc859d9765cb3daa2ff928b8ec8ba0f13.zip
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
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 1a774e434..3a1c5f700 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2185,6 +2185,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "set http keepalive handler");
if (r->discard_body) {
+ r->write_event_handler = ngx_http_request_empty_handler;
r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000);
ngx_add_timer(rev, clcf->lingering_timeout);
return;