Varnish VCL changes from 2.1.5 to 3.0.1
Kevin Pettijohn
kpettijohn at tarot.com
Wed Sep 14 22:10:09 CEST 2011
Hello everyone,
I am having some issues with the VCL in Varnish 3.0.1. Below is the VCL configuration I used to remove unwanted cookies from our sites but after upgrading to Varnish 3.0.1 this will no longer compile.
// Remove all cookies except the Drupal session cookie
if (req.http.Cookie) {
set req.http.Cookie = ";" req.http.Cookie;
set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";");
set req.http.Cookie = regsuball(req.http.Cookie, ";(PHPSESSID)=", "; \1=");
set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[0-9a-f]{32,32})=", "; \1=");
set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", "");
set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", "");
if (req.http.Cookie == "") {
remove req.http.Cookie;
}
}
Here is the error from the compile:
Message from VCC-compiler:
Expected ';' got 'req.http.Cookie'
(program line 174), at
('input' Line 24 Pos 31)
set req.http.Cookie = ";" req.http.Cookie;
------------------------------###############-
Running VCC-compiler failed, exit 1
VCL compilation failed
Is there a fix for this configuration?
Any insight would be much appreciated.
Thanks,
Kevin
__________________
Kevin Pettijohn
Operations & IT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110914/985afb61/attachment-0003.html>
More information about the varnish-misc
mailing list