gathering upstream response headers

dobe nginx-forum at
Wed Dec 23 09:24:31 MSK 2009

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

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

More information about the nginx mailing list