CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh agentzh at gmail.com
Wed Oct 28 07:45:03 MSK 2009


On Wed, Oct 28, 2009 at 12:26 PM, agentzh <agentzh at gmail.com> wrote:
> On Tue, Oct 27, 2009 at 9:41 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
>> Could you please try to produce reduced code that triggers the issue?
>>
>
> 2. In A's post_subrequest's handler, i.e., the
> "post_subrequest_handler" function, issues subrequest B to a location,
> say, /foo, that involves I/O operations, like this:
>
>    location /foo {
>       proxy_pass "http://bar.com/baz";
>    }
>

Oops, forget to mention that this subrequest B is issued using the
subrequest A's parent request object. The "post_subrequest_handler"
function's implementation looks like this:

    static ngx_int_t
    post_subrequest_handler(ngx_http_request_t *r) {
        rc = ngx_http_subrequest(r->parent, &location, url_args, &sr, psr, 0);
        if (rc != NGX_OK) {
            return NGX_ERROR;
        }
        return NGX_OK;
    }

And yeah, I know this piece of code looks very tricky and I was so
delighted to find out that it actually worked in those previous
versions :)

Cheers,
-agentzh





More information about the nginx mailing list