December 23, 2009 01:24AM
hi all

i need to gather all upstream response headers of a given special type (e.g: "x_something") in order to process them later. what would be the best solution to achieve this in nginx (e.g via a custom module). the problem here is that i have more than one upstream per single main request. e.g via ssi or the ngx_echo module.

the "upstream_http_*" variables of the upstream module does this for the last upstream, but i need to gather the headers at the end of the main request. e.g in a location like this:

location = /test {
echo_location /sub1;
echo_location /sub2;
}

if sub1 gets a remote response header "x_something: 1" and sub2 gets a response header "x_something: 2" i'd like to end up with a variable "1 2". it would also be possible to use the ngx_memc module's "append" method to have all headers stored in memcacheed.

any clues

thanks in advance, bernd
Subject Author Posted

gathering upstream response headers

dobe December 23, 2009 01:24AM

Re: gathering upstream response headers

agentzh December 23, 2009 01:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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