comparison src/http/ngx_http_upstream.c @ 3963:10fbb8f02a45

finalizing with rc == 0 in unbuffered proxy mode caused nginx to wait for another send_timeout before actually closing client's connection if client timed out while still talking to upstream server patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Fri, 22 Jul 2011 13:30:16 +0000
parents f1f194ceab16
children 215fe9223419
comparison
equal deleted inserted replaced
3962:df2ae4bc7415 3963:10fbb8f02a45
2315 c->log->action = "sending to client"; 2315 c->log->action = "sending to client";
2316 2316
2317 if (wev->timedout) { 2317 if (wev->timedout) {
2318 c->timedout = 1; 2318 c->timedout = 1;
2319 ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out"); 2319 ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out");
2320 ngx_http_upstream_finalize_request(r, u, 0); 2320 ngx_http_upstream_finalize_request(r, u, NGX_HTTP_REQUEST_TIME_OUT);
2321 return; 2321 return;
2322 } 2322 }
2323 2323
2324 ngx_http_upstream_process_non_buffered_request(r, 1); 2324 ngx_http_upstream_process_non_buffered_request(r, 1);
2325 } 2325 }
3011 } 3011 }
3012 3012
3013 #endif 3013 #endif
3014 3014
3015 if (u->header_sent 3015 if (u->header_sent
3016 && rc != NGX_HTTP_REQUEST_TIME_OUT
3016 && (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE)) 3017 && (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE))
3017 { 3018 {
3018 rc = 0; 3019 rc = 0;
3019 } 3020 }
3020 3021