Duplicated Content-Length headers on pass

Henry Paulissen h.paulissen at qbell.nl
Tue Oct 26 10:52:23 CEST 2010


Yes, this was a RL problem for us (found it a month ago, but never reported
it).
And I did this to solve it:

if (resp.status == 302) {
       remove resp.http.Content-Length;
}

in vcl_deliver.

The problem seems to be in chunked reponses and status codes other as 200
(maybe even only in 301/302).
Google Chrome is complaining about duplicate content-length headers and
there is already a bug report of it at the chrome dev team, other browsers
don't seem to dislike it.

Regards,

-----Original Message-----
From: varnish-misc-bounces at varnish-cache.org
[mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Tollef Fog Heen
Sent: dinsdag 26 oktober 2010 9:44
To: varnish-misc at varnish-cache.org
Subject: Duplicated Content-Length headers on pass


Hi all,

it seems like a small, but pesky bug snuck its way into 2.1.4, in which
you might see duplicated Content-Length headers when using pass.

As a workaround for this, I believe doing

  sub vcl_fetch {
    if (req.request != "HEAD") {
      unset beresp.http.content-length;
    }
  }

should work, or you can use the patch from
http://www.varnish-cache.org/trac/changeset/5461

This will also hit the 2.1 SVN branch in a few minutes.

Feedback on whether this bug poses a real-world problem for people or
not would be most welcome.

Regards,
-- 
Tollef Fog Heen
Varnish Software
t: +47 21 98 62 64

_______________________________________________
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