comparison src/http/ngx_http_upstream.c @ 5169:f6bbe77794aa

Upstream: fixed $upstream_response_length without buffering. Reported by Piotr Sikora.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 11 Apr 2013 13:49:13 +0000
parents 85ee9d858dcb
children 07e515e65984 560de9681661
comparison
equal deleted inserted replaced
5168:482fda984556 5169:f6bbe77794aa
3305 if (u->state && u->state->response_sec) { 3305 if (u->state && u->state->response_sec) {
3306 tp = ngx_timeofday(); 3306 tp = ngx_timeofday();
3307 u->state->response_sec = tp->sec - u->state->response_sec; 3307 u->state->response_sec = tp->sec - u->state->response_sec;
3308 u->state->response_msec = tp->msec - u->state->response_msec; 3308 u->state->response_msec = tp->msec - u->state->response_msec;
3309 3309
3310 if (u->pipe) { 3310 if (u->pipe && u->pipe->read_length) {
3311 u->state->response_length = u->pipe->read_length; 3311 u->state->response_length = u->pipe->read_length;
3312 } 3312 }
3313 } 3313 }
3314 3314
3315 u->finalize_request(r, rc); 3315 u->finalize_request(r, rc);