varnishtest "test various custom parameter settings"
server s1 {
loop 5 {
loop 7 {
rxreq
txresp -body {Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.}
}
...
...
@@ -116,6 +116,56 @@ varnish v1 -vcl+backend {
client c1 -run
# lgwin
varnish v1 -vcl+backend {
import ${vmod_brotli};
sub vcl_init {
new mybr = brotli.encoder("br_lg10", lgwin=10);
}
sub vcl_backend_response {
set beresp.filters = "br_lg10 unbr";
set beresp.uncacheable = true;
}
}
client c1 -run
varnish v1 -vcl+backend {
import ${vmod_brotli};
sub vcl_init {
new mybr = brotli.encoder("br_lg24", lgwin=24);
}
sub vcl_backend_response {
set beresp.filters = "br_lg24 unbr";
set beresp.uncacheable = true;
}
}
client c1 -run
varnish v1 -errvcl {vfp brotli failure: new err: lgwin 9 out of range (10 to 24)} {
import ${vmod_brotli};
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new err = brotli.encoder("b", lgwin=9);
}
}
varnish v1 -errvcl {vfp brotli failure: new err: lgwin 25 out of range (10 to 24)} {