Commit d8ea47fc authored by Geoff Simmons's avatar Geoff Simmons

add test b00027.vtc

parent 3c203190
varnishtest "test backend transmission corner cases"
server s1 {
rxreq
txresp
rxreq
txresp -proto HTTP/1.0 -hdr "Connection: keep-alive"
rxreq
send "HTTP/1.1 200 OK\n"
send "Transfer-encoding: foobar\n"
send "\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="be", host="${s1_addr}",
port="${s1_port}",
first_byte_timeout = 2s)) {
return(fail);
}
}
sub vcl_recv {
set req.backend_hint = backend_dyn.by_name("be");
}
sub vcl_backend_response {
set beresp.do_stream = false;
}
} -start
client c1 {
txreq -url /foo
rxresp
expect resp.status == 200
expect resp.bodylen == 0
txreq -url /bar
rxresp
expect resp.status == 200
expect resp.bodylen == 0
txreq -url /barf
rxresp
expect resp.status == 503
} -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