[Varnish] #826: Double Content-Length header when using pass
Varnish
varnish-bugs at varnish-cache.org
Thu Dec 2 18:56:56 CET 2010
#826: Double Content-Length header when using pass
--------------------+-------------------------------------------------------
Reporter: kdajka | Type: defect
Status: new | Priority: normal
Milestone: | Component: regress
Version: 2.1.4 | Severity: normal
Keywords: |
--------------------+-------------------------------------------------------
Hi,
After updating varnish from 2.1.2 to 2.1.4. I'm having problem with double
Content-Length header. Here is my VCL:
{{{
sub vcl_recv {
if ( req.url == "/" ) {
return (pass);
}
}
}}}
My backends are apache servers, which handle req.url == "/", they send 301
redirect, based on user-agent. Apache sends proper Content-Length header,
and varnish doubles it adding same header with identical size. Some mobile
clients can't deal with doubled headers.
I managed to overcome problem with this VCL snippet:
{{{
sub vcl_fetch {
if (beresp.status == 301) {
unset beresp.http.Content-Length;
}
}
}}}
--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/826>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list