Welcome! Log In Create A New Profile

Advanced

When r != r->connection->data

Marat Dakota
March 15, 2015 08:06PM
Hello again.

I'm still struggling with the subrequests. And it looks like I've solved
the most of everything, except for this.

In a few modules I've found a trick:

if (r != r->connection->data)
r->connection->data = r;

I've put this code to my post subrequest callback and before
ngx_http_output_filter() call.
If I remove this code, the request processing will hang dead.

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:

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"

And it looks like the subrequest processing is called twice.

My question is about the proper scenario to handle the situation and about
what exactly r != r->connection->data means.

Thanks.

--
Marat
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

When r != r->connection->data

Marat Dakota 550 March 15, 2015 08:06PM

Re: When r != r->connection->data

Yichun Zhang (agentzh) 235 March 16, 2015 03:14PM

Re: When r != r->connection->data

Marat Dakota 230 March 16, 2015 04:52PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 318
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready