diff src/http/ngx_http_core_module.c @ 2421:8f0f1d151f14

fix r2378, do not activate subrequest if there are already postponed subrequests or data
author Igor Sysoev <igor@sysoev.ru>
date Tue, 23 Dec 2008 17:25:46 +0000
parents 2820d548417d
children 5bdb1591d37f
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2094,9 +2094,18 @@ ngx_http_subrequest(ngx_http_request_t *
     sr->write_event_handler = ngx_http_handler;
 
     if (c->data == r) {
+
+        for (pr = r->postponed; pr; pr = pr->next) {
+            if (pr->request) {
+                goto no_activate;
+            }
+        }
+
         c->data = sr;
     }
 
+no_activate:
+
     sr->in_addr = r->in_addr;
     sr->port = r->port;
     sr->port_text = r->port_text;