PATCH: Fix ticket 1212
Federico G. Schwindt
fgsch at lodoss.net
Tue Oct 16 10:16:01 CEST 2012
bin/varnishtest/tests/r01212.vtc | 9 +++++++++
lib/libvcl/vcc_expr.c | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/bin/varnishtest/tests/r01212.vtc b/bin/varnishtest/tests/r01212.vtc
new file mode 100644
index 0000000..b9d489c
--- /dev/null
+++ b/bin/varnishtest/tests/r01212.vtc
@@ -0,0 +1,9 @@
+varnishtest "#1212 - Vmod with HEADER argument given a STRING asserts the VCL compiler"
+
+varnish v1 -badvcl {
+ import std from "${topbuild}/lib/libvmod_std/.libs/libvmod_std.so" ;
+
+ sub vcl_recv {
+ std.collect("foo");
+ }
+}
diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c
index 06f93ec..4b2390d 100644
--- a/lib/libvcl/vcc_expr.c
+++ b/lib/libvcl/vcc_expr.c
@@ -582,6 +582,7 @@ vcc_Eval_Func(struct vcc *tl, struct expr **e, const struct symbol *sym)
SkipToken(tl, ',');
} else if (fmt == HEADER) {
const struct var *v;
+ ExpectErr(tl, ID);
sym = VCC_FindSymbol(tl, tl->t, SYM_NONE);
ERRCHK(tl);
SkipToken(tl, ID);
More information about the varnish-dev
mailing list