Welcome! Log In Create A New Profile

Advanced

Re: filter chain_link problem

Dennis J.
January 12, 2010 10:52PM
On 01/13/2010 04:05 AM, agentzh wrote:
> On Wed, Jan 13, 2010 at 10:17 AM, Dennis J.<dennisml@conversis.de> wrote:
>> ngx_buf_t *header_buffer;
>> ngx_chain_t *header_link;
>>
>> header_buffer->pos = (u_char *) "<!-- Served by Nginx -->";
>> header_buffer->last = header_buffer->pos + sizeof("<!-- Served by
>> Nginx -->") - 1;
>
> I haven't looked hard, but it seems that you didn't allocate the
> ngx_buf_t object under the header_buffer pointer?

Hm, thinking about it that should have been a problem.
Strangely enough things started working the moment I set
header_buffer->memory=1. Strange.
Anyway I'm already at a point where I can insert a proper header from a
file using ngx_open_cached_file().

What I noticed is that if I don't shift+reload I always get a 304 not
modified. What is the proper way of disabling this caching in a filter so
that the data sent is always fresh? I tried setting r->no_cache but I'm not
even sure the filter function itself is the proper place to do that?

I also tried:

tp = ngx_timeofday();
r->headers_out.last_modified_time = tp->sec;

but that didn't work either.

Regards,
Dennis

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

filter chain_link problem

Dennis J. January 12, 2010 09:24PM

Re: filter chain_link problem

agentzh January 12, 2010 10:10PM

Re: filter chain_link problem

Dennis J. January 12, 2010 10:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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