Handling duplicate headers

Felix felix at seconddrawer.com.au
Sat Apr 17 08:06:44 CEST 2010


Looking at the specs at http://www.faqs.org/rfcs/rfc2616.html section
4.2 seems to indicate that multiple duplicate headers can be present if
they can be concatinated using commas and kept in the same order.

-felix

On Fri, Apr 16, 2010 at 05:13:25PM +0000, Poul-Henning Kamp 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.

-- 
  email: felix at seconddrawer.com.au
    web: http://seconddrawer.com.au/
    gpg: E6FC 5BC6 268D B874 E546 8F6F A2BB 220B D5F6 92E3

Please don't send me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100417/74dc87cb/attachment-0002.pgp>


More information about the varnish-misc mailing list