Varnish VCL changes from 2.1.5 to 3.0.1

Roberto O. Fernández Crisial roberto.fernandezcrisial at gmail.com
Wed Sep 14 22:13:10 CEST 2011


Look at https://www.varnish-cache.org/trac/browser/doc/changes.rst, and then
look for "Change string concatenation to be done using + rather than
implicitly" ;)

Roberto
@rofc

On Wed, Sep 14, 2011 at 5:10 PM, Kevin Pettijohn <kpettijohn at tarot.com>wrote:

> 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
>
>
>
>
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110914/6446ce2f/attachment-0003.html>


More information about the varnish-misc mailing list