# HG changeset patch # User Sergey Kandaurov # Date 1365688153 0 # Node ID f6bbe77794aa5882d097d94df38ecd2926d0964a # Parent 482fda98455654e4af05d6b102450a52743ac720 Upstream: fixed $upstream_response_length without buffering. Reported by Piotr Sikora. diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3307,7 +3307,7 @@ ngx_http_upstream_finalize_request(ngx_h u->state->response_sec = tp->sec - u->state->response_sec; u->state->response_msec = tp->msec - u->state->response_msec; - if (u->pipe) { + if (u->pipe && u->pipe->read_length) { u->state->response_length = u->pipe->read_length; } }