[Varnish] #686: VCL doesn't account for duplicate headers with different content
Varnish
varnish-bugs at varnish-cache.org
Mon Apr 26 10:50:16 CEST 2010
#686: VCL doesn't account for duplicate headers with different content
----------------------+-----------------------------------------------------
Reporter: felix | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone: After Varnish 2.1
Component: varnishd | Version: trunk
Severity: normal | Keywords: vcl headers
----------------------+-----------------------------------------------------
Using Chromium 5.0.342.9 on Linux with a forced refresh (Ctrl+F5) I get
the following in Varnish 2.1.0 on Debian:
{{{
13 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US)
AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2
13 RxHeader c Cache-Control: max-age=0
13 RxHeader c Pragma: no-cache
13 RxHeader c Cache-Control: no-cache
}}}
whereas in Firefox I get:
{{{
Firefox (3.6.3):
13 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.2.3) Gecko/20100402 Namoroka/3.6.3
13 RxHeader c Pragma: no-cache
13 RxHeader c Cache-Control: no-cache
}}}
It seems that rfc2616 section 4.2 allows multiple duplicate headers so
Chrome's behaviour is correct (but not traditional). Varnish seems to be
only using the ''first'' one found.
In the example of Chromium above, a VCL statement of 'req.http.Cache-
Control' would be filled with 'max-age=0' whereas with Firefox it would be
'no-cache'. This makes tests for a forced refresh a little difficult.
--
Ticket URL: <http://varnish-cache.org/ticket/686>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list