Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed ngx_http_test_reading() to finalize request properly.

Maxim Dounin
July 25, 2013 08:00AM
details: http://hg.nginx.org/nginx/rev/aadfadd5af2b
branches:
changeset: 5289:aadfadd5af2b
user: Maxim Dounin <mdounin@mdounin.ru>
date: Fri Jun 14 20:56:07 2013 +0400
description:
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.

diffstat:

src/http/ngx_http_request.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2733,7 +2733,7 @@ closed:
ngx_log_error(NGX_LOG_INFO, c->log, err,
"client prematurely closed connection");

- ngx_http_finalize_request(r, 0);
+ ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST);
}



_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed ngx_http_test_reading() to finalize request properly.

Maxim Dounin 1169 July 25, 2013 08:00AM

Re: [nginx] Fixed ngx_http_test_reading() to finalize request properly.

splitice 751 September 27, 2013 12:08PM

Re: [nginx] Fixed ngx_http_test_reading() to finalize request properly.

Maxim Dounin 434 September 28, 2013 07:36AM

Re: [nginx] Fixed ngx_http_test_reading() to finalize request properly.

splitice 852 September 28, 2013 10:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready