Add a simple content-length test

Ref #10
parent 0c410b25
......@@ -151,6 +151,7 @@ VTC_TESTS = \
vtc/fellow_coverage.vtc \
vtc/fellow_c00093.vtc \
vtc/fellow_t02005.vtc \
vtc/fellow_cl.vtc \
vtc/vut_slashmap.vtc \
vtc/loadmasters.vtc
......
varnishtest "Simple content-length case"
server s1 -listen "${tmpdir}/s1.sock" {
rxreq
txresp -bodylen 65536
rxreq
txresp -bodylen 65537
rxreq
txresp -bodylen 131072
rxreq
txresp -bodylen 131073
} -start
varnish v1 \
-arg "-p fetch_maxchunksize=64k" \
-arg "-E${libvmod_slash}" \
-arg "-sfellow=fellow,${tmpdir}/fellow_global.stv,100MB,1MB,64KB" \
-vcl+backend {
import vtc;
import slash;
sub vcl_init {
slash.tune_fellow(storage.fellow);
}
sub vcl_backend_response {
return (deliver);
}
sub vcl_deliver {
set resp.http.streaming = resp.is_streaming;
}
} -start
client c1 {
txreq -url "/64k"
rxresp
expect resp.http.streaming == true
expect resp.bodylen == 65536
txreq -url "/64k+1"
rxresp
expect resp.http.streaming == true
expect resp.bodylen == 65537
txreq -url "/128k"
rxresp
expect resp.http.streaming == true
expect resp.bodylen == 131072
txreq -url "/128k+1"
rxresp
expect resp.http.streaming == true
expect resp.bodylen == 131073
} -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