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);

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to