Forum: NGINX Postpone filter: don't skip subrequests

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2008-10-27 16:01
(Received via mailing list)
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1221784313 -14400
# Node ID 2a993b1413bab4435a9dfe88bd0889d74b90c3da
# Parent  824321c85af87f85f9a3e56b0dd69d0a84c8d54f
Postpone filter: don't skip subrequests.

When multiple subrequests are used without intermediate chains from main
request, postpone filter may skip some of the subrequests.  Remove
in-loop
microoptimization in ngx_http_postpone_filter_output_postpone() to
handle
such situation properly.

Looks like it's impossible to trigger the problem with official nginx
modules.

diff --git a/src/http/ngx_http_postpone_filter_module.c
b/src/http/ngx_http_postpone_filter_module.c
--- a/src/http/ngx_http_postpone_filter_module.c
+++ b/src/http/ngx_http_postpone_filter_module.c
@@ -190,13 +190,6 @@ ngx_http_postpone_filter_output_postpone
             if (rc == NGX_AGAIN || rc == NGX_ERROR) {
                 return rc;
             }
-
-            r->postponed = r->postponed->next;
-            pr = r->postponed;
-        }
-
-        if (pr == NULL) {
-            break;
         }

         out = pr->out;
This topic is locked and can not be replied to.