Error on http://varnish-cache.org/wiki/VCLExampleDisguiseServer

Peter Fischer letzterfreiercoolername at googlemail.com
Fri Apr 9 17:22:03 CEST 2010


Hi list!

http://varnish-cache.org/wiki/VCLExampleDisguiseServer seems to be
misguiding...

Just copy, paste & adjust the example given on this TRAC page raises:

> Message from VCC-compiler:

Variable 'obj.http.Server' not accessible in method 'vcl_fetch'.

At: (input Line 213 Pos 11)

    unset obj.http.Server;

----------###############-

Running VCC-compiler failed, exit 1


'obj' above should probably be 'beresp', because

sub vcl_fetch {

    /* hide behind old Apache mask */

    unset beresp.http.Server;

    set beresp.http.Server = "Apache/1.3.8";

[...]

}


works for me with the desired result!

Varnish version is a

> ~# /opt/varnish/sbin/varnishd -V

varnishd (varnish-2.1 SVN 4640:4641)

Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS

compiled from source on a

> ~# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 8.04.1

Release:        8.04

Codename:       hardy

installation.

Cheers,
    Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100409/57b3d1f3/attachment-0003.html>


More information about the varnish-dev mailing list