varnishtest "#1406 empty header"

server s1 {
	rxreq
	txresp
} -start

varnish v1 -arg "-p vcc_feature=+allow_inline_c" -vcl+backend {
	import std ;

	C{
		static const struct gethdr_s VGC_HDR_REQ_foo =
		    { HDR_REQ, "\020X-CUSTOM-HEADER:"};
	}C

	sub vcl_recv {
		C{
			VRT_SetHdr(
			    ctx,
			    &VGC_HDR_REQ_foo,
			    0,
			    &(struct strands){.n = 0}
			);
		}C
	}

	sub vcl_deliver {
		if (req.http.X-CUSTOM-HEADER) {
			set resp.http.foo = "yes";
		} else {
			set resp.http.foo = "no";
		}
	}
} -start

client c1 {
	txreq
	rxresp
	expect resp.http.foo == yes
} -run
