Can I modify headers_out's "location" in body filter?

ckong nginx-forum at
Thu Jun 17 12:27:42 MSD 2010

Hi all, 
I'm a newbie in nginx module development. I've a question here, need
your help.
I'm trying to develop a filter, which works with memcached, is used for
request routing.
for example, the conf here:
location /test {
            my_rr on;
            set $memcached_key      $arg_key;
            default_type    text/html;

ps: my_rr enables my filter.
In my filter module, I've modify headers_out.status = 302 in my header
filter, and I want to modify "Location" in my body filter, because the
value of "Location" depends on the response of memcached.

I do modify headers_out.location in my body filter, but it doesn's work.

Could anybody tell me if I miss something?

Great thanks!

Posted at Nginx Forum:,99290,99290#msg-99290

More information about the nginx mailing list