From bc191a2699d44f87e558930e8e0af84de7233950 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 14 May 2012 09:48:05 +0000 Subject: [PATCH] Fixed possible request hang with filter finalization. With r->filter_finalize set the ngx_http_finalize_connection() wasn't called from ngx_http_finalize_request() called with NGX_OK, resulting in r->main->count not being decremented, thus causing request hang in some rare situations. See here for more details: http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002190.html Patch by Yichun Zhang (agentzh). --- src/http/ngx_http_request.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 59d4d4ae6..fa58dd99b 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1933,6 +1933,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) if (rc == NGX_OK && r->filter_finalize) { c->error = 1; + ngx_http_finalize_connection(r); return; }