comparison src/http/ngx_http_request.c @ 5289:aadfadd5af2b

Fixed ngx_http_test_reading() to finalize request properly. Previous code called ngx_http_finalize_request() with rc = 0. This is ok if a response status was already set, but resulted in "000" being logged if it wasn't. In particular this happened with limit_req if a connection was prematurely closed during limit_req delay.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 14 Jun 2013 20:56:07 +0400
parents ea2ba6dbe361
children 62be77b0608f
comparison
equal deleted inserted replaced
5288:102d7117ffb8 5289:aadfadd5af2b
2731 } 2731 }
2732 2732
2733 ngx_log_error(NGX_LOG_INFO, c->log, err, 2733 ngx_log_error(NGX_LOG_INFO, c->log, err,
2734 "client prematurely closed connection"); 2734 "client prematurely closed connection");
2735 2735
2736 ngx_http_finalize_request(r, 0); 2736 ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST);
2737 } 2737 }
2738 2738
2739 2739
2740 static void 2740 static void
2741 ngx_http_set_keepalive(ngx_http_request_t *r) 2741 ngx_http_set_keepalive(ngx_http_request_t *r)