[nginx] svn commit: r4621 - trunk/src/http

mdounin at mdounin.ru mdounin at mdounin.ru
Mon May 14 09:48:06 UTC 2012


Author: mdounin
Date: 2012-05-14 09:48:05 +0000 (Mon, 14 May 2012)
New Revision: 4621
URL: http://trac.nginx.org/nginx/changeset/4621/nginx

Log:
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).


Modified:
   trunk/src/http/ngx_http_request.c

Modified: trunk/src/http/ngx_http_request.c
===================================================================
--- trunk/src/http/ngx_http_request.c	2012-05-14 09:13:45 UTC (rev 4620)
+++ trunk/src/http/ngx_http_request.c	2012-05-14 09:48:05 UTC (rev 4621)
@@ -1933,6 +1933,7 @@
 
     if (rc == NGX_OK && r->filter_finalize) {
         c->error = 1;
+        ngx_http_finalize_connection(r);
         return;
     }
 



More information about the nginx-devel mailing list