Patch: avoid multiple vary header entries

Daniel Bornkessel daniel at
Mon Apr 11 16:54:21 MSD 2011

while using nginx & varnish together we had problems when setting a 'Vary' header in our app when nginx is configured with 

gzip_vary  on;

as nginx's created response contain two 'Vary' header entries:

Vary: Accept-Encoding 
Vary: X-Special

however, several clients, including Varnish, don't understand this. Instead they need one header entry:

Vary: Accept-Encoding, X-Special

this is a patch that achieves this behavior. Is there any chance getting this patch into upstream?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-make-sure-all-vary-headers-are-on-one-line-0.9.7.patch
Type: application/octet-stream
Size: 5212 bytes
Desc: not available
URL: <>

More information about the nginx-devel mailing list