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).
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 59d4d4a..fa58dd9 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c
@@ -1933,6 +1933,7 @@ if (rc == NGX_OK && r->filter_finalize) { c->error = 1; + ngx_http_finalize_connection(r); return; }