Commit 35b9981b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a testcase for #1406 to -trunk, which is not affected.

parent a16c0707
varnishtest "#1406 empty header"
server s1 {
rxreq
txresp
} -start
varnish v1 -arg "-p vcc_allow_inline_c=true" -vcl+backend {
import ${vmod_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, vrt_magic_string_end );
}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
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