Subrequest concatenation

if someone would shed light on how subrequests are concatenated to the
parent request and send to the client it’d be much appreciated.
currently i have been able to issue a subrequest and have verified both
the parent request and subrequest successfully return a valid response.

what happens now is that neither the parent request or concatenated
subrequest are returned to my browser. an empty request is returned to
my browser after waiting for a response for up to 60 seconds.

i’ve looked into the addition and echo modules which were of great help,
any other pointers you may have would be much appreciated.

Posted at Nginx Forum:

On Sat, May 8, 2010 at 1:37 AM, peterjanovsky [email protected]
wrote:

if someone would shed light on how subrequests are concatenated to the parent request and send to the client it’d be much appreciated.

The subrequest model is a bit complicated. Basically, there’s a
r->postponed chain that glean responses from the subrequests as well
as the current (parent) request.

It’s worth mentioning that there’s also a r->posted_requests chain
that manage the “active request” relay sequence. Only the active
request can respond to the read/write event of the downstream
connection (i.e., r->connection).

what happens now is that neither the parent request or concatenated subrequest are returned to my browser. an empty request is returned to my browser after waiting for a response for up to 60 seconds.

It’s not uncommon at all. I ran into similar issues last night (while
hacking on my ngx_srcache module) just because I didn’t get every bit
right (see y explanation above). :slight_smile:

Cheers,
-agentzh

On Mon, May 10, 2010 at 11:39 AM, agentzh [email protected] wrote:

On Sat, May 8, 2010 at 1:37 AM, peterjanovsky [email protected] wrote:

if someone would shed light on how subrequests are concatenated to the parent request and send to the client it’d be much appreciated.

The subrequest model is a bit complicated. Basically, there’s a
r->postponed chain that glean responses from the subrequests as well
as the current (parent) request.

Oops, forgot to mention that the concatenation actually happens in
ngx_http_postpone_filter_module.c :slight_smile:

I was interrupted by one of my teammates while writing that mail :wink:

Cheers,
-agentzh