diff src/http/ngx_http_request.c @ 4471:b19a651471d9

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
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 13 Feb 2012 15:33:08 +0000
parents d620f497c50f
children c95b828912a3
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2010,6 +2010,7 @@ ngx_http_finalize_request(ngx_http_reque
         if (r == c->data) {
 
             r->main->count--;
+            r->main->subrequests++;
 
             if (!r->logged) {