varnishtest "Test restart in vcl_synth"

server s1 {
	rxreq
	txresp
} -start

varnish v1 -vcl+backend {
	sub vcl_recv {
		if (req.restarts == 0) {
			return (synth(701, "FOO"));
		}
	}
	sub vcl_synth {
		if (req.restarts < 1) {
			return (restart);
		} else {
			set resp.status = 201;
		}
	 }
 } -start

client c1 {
	txreq -url "/"
	rxresp
	expect resp.status == 200
} -run
