From fda7d021ca23d43cb7a17ff92cd4ad5c805a156c Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Thu, 17 Dec 2015 16:39:15 +0300 Subject: Upstream: don't keep connections on early responses (ticket #669). --- src/http/ngx_http_upstream.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/http/ngx_http_upstream.c') diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 6c6ee8000..99ef3aec7 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1441,6 +1441,7 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) } u->request_sent = 0; + u->request_body_sent = 0; if (rc == NGX_AGAIN) { ngx_add_timer(c->write, u->conf->connect_timeout); @@ -1825,6 +1826,8 @@ ngx_http_upstream_send_request(ngx_http_request_t *r, ngx_http_upstream_t *u, /* rc == NGX_OK */ + u->request_body_sent = 1; + if (c->write->timer_set) { ngx_del_timer(c->write); } -- cgit