Vary Header not applying correctly

#1
Our caching proxy servers require the vary: accept-encoding header for every response wether or not a compressed page is requested. Adding "Vary: Accept-Encoding" to the extra headers configuration section of litespeed adds the vary header twice to the response if the response is compressed. It should append the value of the header if the response already contains the vary header. Our caching proxy servers only pay attention to the first vary header they see in the response and ignore the second.

Is there a way to turn on vary headers even if the content is not compressed so our caching proxy can properly cache the responses?

Thanks,
--Jeff
 
#3
Our reverse web proxy only pays attention to the first one it sees. So pages that are compressed may not get cached if it never sees accept-encoding: gzip.
 

mistwang

LiteSpeed Staff
#4
Still not sure what exactly is the problem, but I think it is a bug in the cache proxy not LSWS, it should be able to take two "Vary" headers.

Maybe the easiest solution is to use LSWS 4.0rc1 cache function and get rid of the cache proxy.
 
#5
Apache has mod_headers to prevent duplicate headers from responses and the http 1.1 spec seems to recommend against creating duplicate headers in a response.
 
Top