Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Bugs

#1000: server.ip can`t beused as a string?

 

 

Varnish bugs RSS feed   Index | Next | Previous | View Threaded


varnish-bugs at varnish-cache

Aug 31, 2011, 4:06 AM

Post #1 of 3 (306 views)
Permalink
#1000: server.ip can`t beused as a string?

#1000: server.ip can`t beused as a string?
-------------------+--------------------------------------------------------
Reporter: xrow | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.0 | Severity: normal
Keywords: |
-------------------+--------------------------------------------------------
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

--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/1000>
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


varnish-bugs at varnish-cache

Aug 31, 2011, 5:46 AM

Post #2 of 3 (298 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: new | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.0 | Severity: normal
Keywords: |
-------------------+--------------------------------------------------------

Comment(by scoof):

You can work around this by doing: set resp.http.X-Cache = "" + server.ip
+ ":HIT:" + obj.hits;

--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/1000#comment:1>
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


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

Varnish bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.