Commit 8a1948fa authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

BLOBs have a .tostring now, but test other type which do not.

parent ed278561
......@@ -388,6 +388,10 @@ varnish v1 -errvcl {Symbol 'acl' has wrong type (reserved), expected acl:} {
sub vcl_recv { if (client.ip ~ acl) {} }
}
varnish v1 -errvcl {Cannot convert HTTP to STRING} {
sub vcl_synth { set resp.http.foo = resp; }
}
server s1 {
rxreq
txresp -hdr "bar: X"
......
......@@ -288,15 +288,9 @@ vcc_expr_tostring(struct vcc *tl, struct expr **e, vcc_type_t fmt)
(*e)->constant = constant;
(*e)->nstr = 1;
} else {
if ((*e)->fmt == BLOB)
VSB_cat(tl->sb,
"Wrong use of BLOB value.\n"
"BLOBs can only be used as arguments to VMOD"
" functions.\n");
else
VSB_printf(tl->sb,
"Cannot convert %s to STRING.\n",
vcc_utype((*e)->fmt));
VSB_printf(tl->sb,
"Cannot convert %s to STRING.\n",
vcc_utype((*e)->fmt));
vcc_ErrWhere2(tl, (*e)->t1, tl->t);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment