Welcome! Log In Create A New Profile

Advanced

Re: Subrequest using Parent Request Body

agentzh
May 09, 2010 11:16PM
On Mon, May 10, 2010 at 8:30 AM, peterjanovsky <nginx-forum@nginx.us> wrote:
> i may be experiencing the same issue.  built a filter which sends a
> subrequest to a location different from the parent request.  in my scenario
> i've seen both the parent and subrequest called first (varnishlog), haven't
> been able to figure out why the order in which requests are called is not
> consistent.

Because non-blocking I/O takes action here (well, merely a guess,
because I haven't seen your code and config) :)

There's a consistent "active request" relay chain going on here
though, i.e., the pointer of r->connection->data. One should not take
certain actions when the current "active request" is not the one that
is being operated in most cases, or he will run into troubles :) Also,
be very careful with r->main->count, if one does not get it right,
mysterious issues like response truncating and request hanging are not
unusual at all :) (In those cases, --with-debug is your friend :))

There're a bunch of nginx modules that take advantage of subrequests,
like ngx_addition, ngx_ssi, ngx_eval, ngx_echo, ngx_auth_request (and
more are coming!)

Cheers,
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Subrequest using Parent Request Body

Matthieu Tourne May 07, 2010 06:42PM

Re: Subrequest using Parent Request Body

peterjanovsky May 09, 2010 08:30PM

Re: Subrequest using Parent Request Body

agentzh May 09, 2010 11:16PM

Re: Subrequest using Parent Request Body

Maxim Dounin May 10, 2010 09:48PM

Re: Subrequest using Parent Request Body

Matthieu Tourne May 12, 2010 03:20PM

Re: Subrequest using Parent Request Body

Maxim Dounin May 12, 2010 05:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 315
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready