<div dir="ltr"><div>Hello again.</div><div><br></div>I'm still struggling with the subrequests. And it looks like I've solved the most of everything, except for this.<div><br></div><div>In a few modules I've found a trick:<br><br>if (r != r->connection->data)<br> r->connection->data = r;</div><div><br></div><div>I've put this code to my post subrequest callback and before ngx_http_output_filter() call.</div><div>If I remove this code, the request processing will hang dead.</div><div><br></div><div>With this code my simple tests work fine. But when I try to make a subrequest from a subrequest I get something like this in the error log:</div><div>
<p class=""><span class="">2015/03/16 02:55:39 [alert] 73485#0: *2 subrequest: "/lalala/?" logged again, client: 127.0.0.1, server: localhost, request: "POST /test1 HTTP/1.1", subrequest: "/lalala/", host: "localhost"</span></p><p class="">And it looks like the subrequest processing is called twice.</p><p class="">My question is about the proper scenario to handle the situation and about what exactly r != r->connection->data means.</p><p class="">Thanks.</p><p class="">--<br>Marat</p></div>
</div>