
varnish-bugs at varnish-cache
Aug 31, 2011, 8:20 AM
Post #3 of 3
(315 views)
Permalink
|
|
Re: #1000: server.ip can`t beused as a string?
[In reply to]
|
|
#1000: server.ip can`t beused as a string? -------------------------+-------------------------------------------------- Reporter: xrow | Type: defect Status: closed | Priority: normal Milestone: | Component: varnishd Version: 3.0.0 | Severity: normal Resolution: worksforme | Keywords: -------------------------+-------------------------------------------------- Changes (by phk): * status: new => closed * resolution: => worksforme Old description: > wienadmin [at] slvieprodweb0:~$ sudo /etc/init.d/varnish restart > Stopping HTTP accelerator: varnishd. > Starting HTTP accelerator: varnishd failed! > SMA.s0: max size 3072 MB. > Message from VCC-compiler: > Operator + not possible on type IP. > ('input' Line 227 Pos 43) > set resp.http.X-Cache = server.ip + ":HIT:" + obj.hits; > ------------------------------------------#-------------------- > > Running VCC-compiler failed, exit 1 > > VCL compilation failed > > ------------- > something like that was posible with 2.x New description: {{{ wienadmin [at] slvieprodweb0:~$ sudo /etc/init.d/varnish restart Stopping HTTP accelerator: varnishd. Starting HTTP accelerator: varnishd failed! SMA.s0: max size 3072 MB. Message from VCC-compiler: Operator + not possible on type IP. ('input' Line 227 Pos 43) set resp.http.X-Cache = server.ip + ":HIT:" + obj.hits; ------------------------------------------#-------------------- Running VCC-compiler failed, exit 1 VCL compilation failed }}} ------------- something like that was posible with 2.x -- Comment: This is because the VCC compiler builds expressions left to right, so seeing server.ip it has type "IP", then you try to add a string to that and it barfs. The workaround (see above) starts out with STRING, then adds IP, but since everything, including IP, can be converted to string, that works out fine. -- Ticket URL: <http://www.varnish-cache.org/trac/ticket/1000#comment:2> Varnish <http://varnish-cache.org/> The Varnish HTTP Accelerator _______________________________________________ varnish-bugs mailing list varnish-bugs [at] varnish-cache https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
|