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

add test g00004.vtc

parent e53821be
varnishtest "truncated gzip from backend"
server s1 -repeat 2 {
rxreq
txresp -nolen \
-hdr "Content-Encoding: gzip" \
-hdr "Transfer-Encoding: Chunked"
send "18\r\n"
# A truncate gzip file
sendhex "1f8b"
sendhex "08"
sendhex "00"
sendhex "f5 64 ae 4e 02 03 f3 cd cf 53 f0 4f"
sendhex "2e 51 30 36 54 30 b0 b4"
send "\r\n"
chunkedlen 0
} -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}")) {
return(fail);
}
}
sub vcl_recv {
set req.backend_hint = backend_dyn.by_name("be");
}
sub vcl_backend_response {
set beresp.do_stream = false;
if (bereq.url == "/gunzip") {
set beresp.do_gunzip = true;
}
}
}
varnish v1 -cliok "param.set debug +syncvsl"
varnish v1 -start
client c1 {
txreq
rxresp
expect resp.status == 503
} -run
client c1 {
txreq -url /gunzip
rxresp
expect resp.status == 503
} -run
varnish v1 -expect VBE.vcl1.be.happy == 0
varnish v1 -expect MAIN.n_backend == 2
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