Author: mdounin
Date: 2012-02-13 15:33:08 +0000 (Mon, 13 Feb 2012)
New Revision: 4472
Log:
Core: protection from subrequest loops.
Without the protection, subrequest loop results in r->count overflow and
SIGSEGV. Protection was broken in 0.7.25.
Note that this also limits number of parallel subrequests. This
wasn't exactly the case before 0.7.25 as local subrequests were
completed directly.
See here for details:
http://nginx.org/pipermail/nginx-ru/2010-February/032184.html
Modified:
trunk/src/http/ngx_http_core_module.c
trunk/src/http/ngx_http_request.c
Modified: trunk/src/http/ngx_http_core_module.c
===================================================================
--- trunk/src/http/ngx_http_core_module.c 2012-02-13 15:31:07 UTC (rev 4471)
+++ trunk/src/http/ngx_http_core_module.c 2012-02-13 15:33:08 UTC (rev 4472)
@@ -2453,7 +2453,6 @@
sr->start_sec = tp->sec;
sr->start_msec = tp->msec;
- r->main->subrequests++;
r->main->count++;
*psr = sr;
Modified: trunk/src/http/ngx_http_request.c
===================================================================
--- trunk/src/http/ngx_http_request.c 2012-02-13 15:31:07 UTC (rev 4471)
+++ trunk/src/http/ngx_http_request.c 2012-02-13 15:33:08 UTC (rev 4472)
@@ -2010,6 +2010,7 @@
if (r == c->data) {
r->main->count--;
+ r->main->subrequests++;
if (!r->logged) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel