]> git.kaiwu.me - nginx.git/commitdiff
r2067 merge:
authorIgor Sysoev <igor@sysoev.ru>
Mon, 7 Jul 2008 11:32:02 +0000 (11:32 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 7 Jul 2008 11:32:02 +0000 (11:32 +0000)
fix bug when inactive subrequest is truncated,
if output_buffers are less than subrequest size

src/http/ngx_http_postpone_filter_module.c

index 32621664cb287542df186b2408b132149fe222ca..ca5cb9e63f702a99c8c985559ed975c6fb9fc98e 100644 (file)
@@ -168,7 +168,7 @@ ngx_http_postpone_filter_output_postponed_request(ngx_http_request_t *r)
         pr = r->postponed;
 
         if (pr == NULL) {
-            return NGX_OK;
+            break;
         }
 
         if (pr->request) {
@@ -196,7 +196,7 @@ ngx_http_postpone_filter_output_postponed_request(ngx_http_request_t *r)
         }
 
         if (pr == NULL) {
-            return NGX_OK;
+            break;
         }
 
         out = pr->out;
@@ -215,6 +215,17 @@ ngx_http_postpone_filter_output_postponed_request(ngx_http_request_t *r)
 
         r->postponed = r->postponed->next;
     }
+
+    if (r->out) {
+        ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+                       "http postpone filter out again \"%V?%V\"",
+                       &r->uri, &r->args);
+
+        r->connection->data = r;
+        return NGX_AGAIN;
+    }
+
+    return NGX_OK;
 }