<div dir="ltr">Thanks.<div>I'll try to read the postpone filter code.</div><div>It's too late to give up :).</div><div><br></div><div>--</div><div>Marat</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 10:11 PM, Yichun Zhang (agentzh) <span dir="ltr"><<a href="mailto:agentzh@gmail.com" target="_blank">agentzh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Sun, Mar 15, 2015 at 5:05 PM, Marat Dakota wrote:<br>
> In a few modules I've found a trick:<br>
><br>
> if (r != r->connection->data)<br>
> r->connection->data = r;<br>
><br>
<br>
</span>Careful. This is a common hack to cheat nginx's<br>
ngx_http_postpone_filter_module when the in-stock subrequest model<br>
cannot serve us well.<br>
<br>
When the currently serving (sub)request is not the request doing<br>
output, r is not equal to r->connection->data. The latter means the<br>
currently *active* request. This is needed for the postpone filter<br>
module mentioned above. You need to carefully study the filter module<br>
(and ngx_http_finalize_request) before doing any serious subrequest<br>
programming. And nginx subrequests are really a mess for nontrivial<br>
things IMHO (no offense to the official designer) and better avoid<br>
them :)<br>
<br>
Regards,<br>
-agentzh<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</blockquote></div><br></div>