When r != r->connection->data
Marat Dakota
dakota at brokenpipe.ru
Mon Mar 16 20:50:35 UTC 2015
Thanks.
I'll try to read the postpone filter code.
It's too late to give up :).
--
Marat
On Mon, Mar 16, 2015 at 10:11 PM, Yichun Zhang (agentzh) <agentzh at gmail.com>
wrote:
> Hello!
>
> On Sun, Mar 15, 2015 at 5:05 PM, Marat Dakota wrote:
> > In a few modules I've found a trick:
> >
> > if (r != r->connection->data)
> > r->connection->data = r;
> >
>
> Careful. This is a common hack to cheat nginx's
> ngx_http_postpone_filter_module when the in-stock subrequest model
> cannot serve us well.
>
> When the currently serving (sub)request is not the request doing
> output, r is not equal to r->connection->data. The latter means the
> currently *active* request. This is needed for the postpone filter
> module mentioned above. You need to carefully study the filter module
> (and ngx_http_finalize_request) before doing any serious subrequest
> programming. And nginx subrequests are really a mess for nontrivial
> things IMHO (no offense to the official designer) and better avoid
> them :)
>
> Regards,
> -agentzh
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150316/e6232253/attachment.html>
More information about the nginx-devel
mailing list