[Varnish] #1212: Vmod with HEADER argument given a STRING asserts the VCL compiler
Varnish
varnish-bugs at varnish-cache.org
Fri Oct 12 11:16:01 CEST 2012
#1212: Vmod with HEADER argument given a STRING asserts the VCL compiler
----------------------+-------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: 3.0.3
Severity: normal | Keywords:
----------------------+-------------------
The header vmod defines append as follows:
Function VOID append(HEADER,STRING_LIST)
When giving it a string instead of a header the compiler doesn't handle
this well and asserts:
{{{
lkarsten at immer:~$ /opt/varnish/sbin/varnishd -C -f assert.vcl
Message from VCC-compiler:
Assert error in VCC_FindSymbol(), vcc_symb.c line 120:
Condition(t->tok == ID) not true.
Running VCC-compiler failed, signal 6
VCL compilation failed
lkarsten at immer:~$
}}}
assert.vcl content:
{{{
import header;
backend default { .host="127.0.0.1"; .port="8080"; }
sub vcl_deliver {
// incorrect, asserts the compiler
header.append("Set-Cookie", "foo");
// correct, works as expected
header.append(resp.http.Set-Cookie, "foo");
}
}}}
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1212>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list