git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3516
d4fa192b-c00b-0410-8231-
f00ffab90ce4
{
struct ban_test *bt;
char buf[512];
+ struct vsb *sb;
int i;
CHECK_OBJ_NOTNULL(b, BAN_MAGIC);
}
/* XXX: proper quoting */
- asprintf(&bt->test, "%s %s \"%s\"", a1, a2, a3);
-
+ sb = vsb_newauto();
+ XXXAN(sb);
+ vsb_printf(sb, "%s %s ", a1, a2);
+ vsb_quote(sb, a3, 0);
+ vsb_finish(sb);
+ AZ(vsb_overflowed(sb));
+ bt->test = strdup(vsb_data(sb));
+ XXXAN(bt->test);
+ vsb_delete(sb);
return (0);
}
varnish v1 -clierr 106 "purge a b c && a"
varnish v1 -clierr 106 "purge a b c && a b"
varnish v1 -clierr 106 "purge a b c || a b c"
-varnish v1 -cli "purge req.url ~ foo"
-# varnish v1 -cli "purge req.url ~ foo && req.url ~ bar"
+varnish v1 -cliok "purge req.url ~ foo && req.url ~ \"[ o]\""
+varnish v1 -cliok "purge.list"
client c1 {
txreq -url "/foo"