Commit 5d14d62a authored by Geoff Simmons's avatar Geoff Simmons

add test b00022.vtc

parent 1f94e0ae
varnishtest "Check the between_bytes_timeout behaves from backend definition"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
send "HTTP/1.0 200 OK\r\nConnection: close\r\n\r\n"
delay 1.5
send "Baba\n"
} -start
varnish v1 -vcl {
import backend_dyn from "${vmod_topbuild}/src/.libs/libvmod_backend_dyn.so";
backend dummy { .host="${bad_ip}"; }
sub vcl_init {
if (!backend_dyn.create(name="b1", host="${s1_addr}",
port="${s1_port}",
between_bytes_timeout = 1s)) {
return(fail);
}
}
sub vcl_recv {
set req.backend_hint = backend_dyn.by_name("b1");
}
sub vcl_backend_response {
set beresp.do_stream = false;
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 503
} -run
server s1 {
rxreq
send "HTTP/1.0 200 OK\r\nConnection: close\r\n\r\n"
delay 0.5
send "Baba\n"
delay 0.5
send "Baba\n"
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
} -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