nginx

changeset 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 102d7117ffb8
children 355779f81491
files src/http/ngx_http_request.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/http/ngx_http_request.c	Thu Jul 25 14:54:53 2013 +0400
     1.2 +++ b/src/http/ngx_http_request.c	Fri Jun 14 20:56:07 2013 +0400
     1.3 @@ -2733,7 +2733,7 @@
     1.4      ngx_log_error(NGX_LOG_INFO, c->log, err,
     1.5                    "client prematurely closed connection");
     1.6  
     1.7 -    ngx_http_finalize_request(r, 0);
     1.8 +    ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST);
     1.9  }
    1.10  
    1.11