Handling duplicate headers
Sam Crawford
samcrawford at gmail.com
Fri Apr 16 21:40:33 CEST 2010
Hrmmm, which version of Chrome is that? I'm running the latest 5.0
beta and I'm seeing the following:
** Using F5 only **
GET /Headers/ HTTP/1.1
Host: xxxxxxxxxxx
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/533.5 (KHTML, like Gecko) Chrome/5.0.378.0 Safari/533.5
Cache-Control: no-cache
Pragma: no-cache
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
** Using CTRL+F5 **
GET /Headers/ HTTP/1.1
Host: xxxxxxxxxxxxxxxxx
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/533.5 (KHTML, like Gecko) Chrome/5.0.378.0 Safari/533.5
Cache-Control: max-age=0
Pragma: no-cache
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
If I remember rightly, the above is also how Firefox handles
Cache-Control headers.
I've not been able to make Chrome emit two Cache-Control headers on a
single request.
Thanks,
Sam
On 16 April 2010 18:13, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> In message <20100416170714.GA4512 at thinkpad>, Felix writes:
>
>>Just a question about handling duplicate headers. I am currently using
>>Chrome and trying to get it to pass to the backend on a client forced
>>refresh. Chrome sends the following headers:
>>
>> RxHeader c Cache-Control: max-age=0
>> RxHeader c Cache-Control: no-cache
>>
>>and I have been trying to catch 'no-cache' but it never gets it with
>>this rule:
>>
>> if (req.http.Cache-Control ~ "no-cache")
>>
>>as it seems to fill the 'Cache-Control' header spot with the first one
>>it finds, 'max-age'
>>
>>Is there a way to cope with this or is this a bug?
>
> I'll have to re-read the RFC, Chrome may be within spec, but they're
> certainly breaking tradition...
>
> --
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG | TCP/IP since RFC 956
> FreeBSD committer | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>
More information about the varnish-misc
mailing list