Tracking requests through Varnish servers

samcrawford at samcrawford at
Thu Feb 10 23:23:05 CET 2011

Hi Ben,

Do a search for Varnish string concatenation, it's (briefly) documented in the VCL guide.

The following should do the trick though:

set resp.http.X-Cache = "MISS " resp.http.X-Cache



Sent from my BlackBerry® wireless device

-----Original Message-----
From: Ben Dodd <B.Dodd at>
Sender: varnish-misc-bounces at
Date: Thu, 10 Feb 2011 22:16:54 
To: varnish-misc at<varnish-misc at>
Subject: Tracking requests through Varnish servers


I'd like to be able to track the progress of a request as it passes through multiple Varnish servers (using each other as backends).

What is the best way to do this? I've tried using +=, but this is not acceptable for strings (failed to compile). Currently I have multiple headers as follows but is there a way of concatenating them into a single string?

set resp.http.X-Cache-v1 = "MISS"
set resp.http.X-Cache-v2 = "HIT"

Thanks, Ben

Comic Relief  1st Floor  89 Albert Embankment  London SE1 7TP  Tel: 020 7820 2000  Fax: 020 7820 2222  red at

Comic Relief is the operating name of Charity Projects, a company limited by guarantee and registered in England no. 1806414; registered charity 326568 (England & Wales) and SC039730 (Scotland). Comic Relief Ltd is a subsidiary of Charity Projects and registered in England no. 1967154. Registered offices: Hanover House, 14 Hanover Square, London W1S 1HP. VAT no. 773865187.

This email (and any attachment) may contain confidential and/or privileged information. If you are not the intended addressee, you must not use, disclose, copy or rely on anything in this email and should contact the sender and delete it immediately. The views of the author are not necessarily those of Comic Relief. We cannot guarantee that this email (and any attachment) is virus free or has not been intercepted and amended, so do not accept liability for any damage resulting from software viruses. You should carry out your own virus checks.

varnish-misc mailing list
varnish-misc at

More information about the varnish-misc mailing list