Hi,<div><br></div><div>Arg, it's not a good news :)</div><div><br></div><div>Do you think I can do ngx_http_subrequest to do some additional request to back end ?</div><div>How to say to nginx to wait for subrequest before calling create_request ?</div>
<div><br></div><div>Regards,</div><div><br></div><div>Bertrand</div><div><br></div><div><br><div class="gmail_quote">On Mon, Jan 16, 2012 at 22:20, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div><div class="h5"><br>
On Mon, Jan 16, 2012 at 09:40:26PM +0100, Bertrand Paquet wrote:<br>
<br>
> Hi all,<br>
><br>
> I'm trying to write an upstream which have to do multiple request / reply<br>
> with backend, for one frontend request.<br>
><br>
> Currently,<br>
> - I'm writing first request to backend in create_request handler, write<br>
> data into r->upstream->request_bufs, and returning NGX_OK<br>
> - Nginx call me on process_header. I can read data from<br>
> r->upstream->buffer. I can loop on process_header if I return NGX_AGAIN.<br>
> But I'm not able to send more data to backend. I try to add buffer in<br>
> r->upstream->request_bufs, in r->upstream->request_bufs->next, nothing work.<br>
><br>
> Anybody know how to send data to backend in the process_header callback ?<br>
<br>
</div></div>The upstream module is designed to handle "single request - single<br>
response" model, it's not capable of sending multiple requests to<br>
backend.<br>
<br>
Maxim Dounin<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>