varnishtest "ticket 1398"

varnish v1 -syntax 4.0 -vcl {
	backend foo {
		.host = "${bad_backend}";
	}
	sub vcl_backend_response {
		set beresp.http.X-BE-Name = beresp.backend.name;
		set beresp.http.X-BE-IP = beresp.backend.ip;
	}
} -start

client c1 {
	txreq
	rxresp
	expect resp.status == 503
	expect resp.http.X-BE-Name == "<undef>"
	expect resp.http.X-BE-IP == "<undef>"
} -run

