vtest "#1406 empty header"

server s1 {
	rxreq
	txresp
} -start

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

	C{
		static const struct gethdr_s VGC_HDR_REQ_foo =
		    { HDR_REQ, HDR("X-CUSTOM-HEADER")};
	}C

	sub vcl_recv {
		C{
			VRT_SetHdr(
			    ctx,
			    &VGC_HDR_REQ_foo,
			    0,
			    vrt_null_strands);
		}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
