Welcome! Log In Create A New Profile

Advanced

Re: The meaning of ngx_http_request_t.out ?

Maxim Dounin
August 27, 2013 10:22AM
Hello!

On Tue, Aug 27, 2013 at 11:21:38AM +0800, 邓尧 wrote:

> Hi,
> I'm writing an nginx module, it does something similar to the sub module.
> After some research I succeeded in handling the ngx_chain_t pointer passed
> to my body filter. My module seems to work well for static files.
> When my module is handling PHP responses (fastcgi), sometimes the
> ngx_chain_t pointer is NULL. I simply call the next body filter in such
> situation like the sub module body filter. However function
> ngx_http_write_filter() will fail, because r->out isn't NULL
> and the buf's in r->out are of zero size.
> My questions are: what's the meaning of r->out? how should I modify it in
> my body filter ? Could I simply return NGX_OK in my body filter without
> calling the next body filter if the ngx_chain_t pointer is NULL ?

The r->out is write filter's private data, you shouldn't touch it
in your module. And it shouldn't contain zero size non-special
buffers, if it does - there is a bug somewhere (most likely in
your filter).

--
Maxim Dounin
http://nginx.org/en/donation.html

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

The meaning of ngx_http_request_t.out ?

邓尧 869 August 26, 2013 11:22PM

Re: The meaning of ngx_http_request_t.out ?

Maxim Dounin 338 August 27, 2013 10:22AM

Re: The meaning of ngx_http_request_t.out ?

邓尧 385 August 28, 2013 05:56AM

Re: The meaning of ngx_http_request_t.out ?

Maxim Dounin 693 August 28, 2013 07:42AM



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

Online Users

Guests: 101
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