Commit d8508826 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add tests for outgoing Connection: close handling

parent e5576929
varnishtest "Connection: close in vcl_synth{}"
server s1 {
rxreq
txresp -status 400
} -start
varnish v1 -vcl+backend {
sub vcl_miss {
if (req.url == "/333") {
return (synth(333, "FOO"));
} else {
return (synth(334, "BAR"));
}
}
sub vcl_synth {
if (resp.status == 333) {
set resp.http.connection = "close";
}
}
} -start
client c1 {
txreq -url /334
rxresp
expect resp.status == 334
txreq -url /334
rxresp
expect resp.status == 334
txreq -url /333
rxresp
expect resp.status == 333
expect_close
} -run
varnishtest "Connection: close in vcl_deliver{}"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_deliver {
set resp.http.Connection = "close";
}
} -start
client c1 {
txreq
rxresp
expect_close
} -run
client c1 {
txreq
rxresp
expect_close
} -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