[Varnish] #383: Unexplained vcl behaivior maybe header related to header modify
Varnish
varnish-bugs at projects.linpro.no
Wed Nov 19 13:03:48 CET 2008
#383: Unexplained vcl behaivior maybe header related to header modify
------------------------+---------------------------------------------------
Reporter: chrisrixon | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone: Varnish 2.1 release
Component: varnishd | Version: 2.0
Severity: normal | Keywords: vcl header
------------------------+---------------------------------------------------
If we uncomment the block of code below we get many more backend hits. It
seems to be related to the gzip header modification because if thats
commented out it works.
Possibly related to #292 ?
Its puzzling us as the offending code looks like it should be a NOP ...
{{{
sub vcl_recv {
set req.grace = 2m;
# coment this block to fix it
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|png|gif|gz|tgz|mp3|zip|swf)") {
# No point in compressing these
remove req.http.Accept-Encoding;
} elsif (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} else {
# unkown algorithm
remove req.http.Accept-Encoding;
}
}
if (req.request != "GET" && req.request != "HEAD") {
pipe;
}
if (req.http.Expect) {
pipe;
}
if (req.http.Authenticate) {
pass;
}
if (req.http.Cache-Control ~ "no-cache") {
pass;
}
# uncomment this to break it
# if (req.request != "GET" &&
# req.request != "HEAD" &&
# req.request != "PUT" &&
# req.request != "POST" &&
# req.request != "TRACE" &&
# req.request != "OPTIONS" &&
# req.request != "DELETE") {
# /* Non-RFC2616 or CONNECT which is weird. */
# pipe;
# }
lookup;
}
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/383>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list