Commit 8457ac6e authored by Federico G. Schwindt's avatar Federico G. Schwindt

Add some tests from the 4.0 branch

parent 7d25d3a1
varnishtest "do_esi + do_gzip + out of storage: #1637"
server s1 {
# First consume (almost) all of the storage
rxreq
expect req.url == /url1
txresp -bodylen 260000
rxreq
expect req.url == /url2
txresp -bodylen 260000
rxreq
expect req.url == /url3
txresp -bodylen 260000
rxreq
expect req.url == /url4
txresp -bodylen 260000
rxreq
expect req.url == /url5
txresp -bodylen 9000
} -start
varnish v1 -arg "-smalloc,1M" -arg "-p nuke_limit=0 -p gzip_level=0" \
-vcl+backend {
sub vcl_backend_response {
if (bereq.url == "/url5") {
set beresp.do_esi = true;
set beresp.do_gzip = true;
}
}
} -start
client c1 {
txreq -url /url1
rxresp
expect resp.status == 200
txreq -url /url2
rxresp
expect resp.status == 200
txreq -url /url3
rxresp
expect resp.status == 200
txreq -url /url4
rxresp
expect resp.status == 200
txreq -url /url5
rxresp
expect resp.status == 503
} -run
varnishtest "#1660: range and synth"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
return (synth(200, "OK"));
}
} -start
client c1 {
txreq -hdr "Range: 0-1"
rxresp
expect resp.status == 200
} -run
varnishtest "Test bogus Content-Length header"
server s1 {
rxreq
txresp -nolen -hdr "Content-Length: bogus"
} -start
varnish v1 -vcl+backend {
} -start
logexpect l1 -v v1 {
expect * 1002 Error "Body cannot be fetched"
} -start
client c1 {
txreq
rxresp
} -run
logexpect l1 -wait
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