Welcome! Log In Create A New Profile

Advanced

Re: How to merge subrequest header.

agentzh
November 25, 2010 06:26AM
On Thu, Nov 25, 2010 at 6:36 PM, Roast <zhang.libing@gmail.com> wrote:
> It seems post_subrequest callback function can't change the parent's
> header,because the parent's header filter has been process finished before
> the function call, and the output buf has created.
>

The key point is that not to send out the parent headers when you need
to change it later (according to its subrequests or other things).

> And I have fixed this problem, at the header filter function. Just like
> following steps,maybe that's not a good way, agentzh pls give me some more
> advanced suggestion.
>
>> static ngx_int_t
>> ngx_http_social_header_filter(ngx_http_request_t *r)
>> {
>>     ...... //some other works
>>

You can surely buffer the parent requests' headers and any outputs
before your subrequest actually finishes in your output filter
functions ;)

Cheers,
-agentzh

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

How to merge subrequest header.

Roast November 24, 2010 08:08AM

Re: How to merge subrequest header.

Roast November 24, 2010 08:02PM

Re: How to merge subrequest header.

agentzh November 25, 2010 05:24AM

Re: How to merge subrequest header.

agentzh November 25, 2010 05:34AM

Re: How to merge subrequest header.

Roast November 25, 2010 05:44AM

Re: How to merge subrequest header.

agentzh November 25, 2010 06:26AM

Re: How to merge subrequest header.

edo888 February 25, 2012 07:02PM

Re: How to merge subrequest header.

agentzh February 27, 2012 04:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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