Commit 7077261e authored by Tollef Fog Heen's avatar Tollef Fog Heen

Mark synthetic as only available in vcl_error

Eventually, we want to be able to do synthetic everywhere, but for
now, mark it as just available in vcl_error.

Fixes: #936
parent 48392ad8
varnishtest "synthetic is only allowed in error"
server s1 {
rxreq
txresp
} -start
varnish v1 -badvcl {
backend foo { .host = "127.0.0.1"; }
sub vcl_recv {
synthetic "HELLOO"; return (error);
}
}
......@@ -342,7 +342,7 @@ static struct action_table {
{ "return", parse_return },
{ "rollback", parse_rollback },
{ "set", parse_set },
{ "synthetic", parse_synthetic },
{ "synthetic", parse_synthetic, VCL_MET_ERROR },
{ "unset", parse_unset },
{ "purge", parse_purge, VCL_MET_MISS | VCL_MET_HIT },
{ NULL, NULL }
......
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