Do not need inline-C any more

parent 8d3bf9f9
......@@ -30,8 +30,7 @@ server s3 {
varnish v1 -arg "-p vcc_allow_inline_c=true" -vcl+backend {
import ${vmod_weightadjust};
C{#include <unistd.h>}C
import vtc;
backend s1_hosthdr {
.host = "${s1_addr}";
......@@ -48,11 +47,11 @@ varnish v1 -arg "-p vcc_allow_inline_c=true" -vcl+backend {
sub vcl_recv {
if (req.url == "/1") {
C{sleep(1);}C
vtc.sleep(1s);
foo.add_backend(backend=s1_hosthdr, weight=1,
weight_update = "^X-Weight: (\d+\.\d+)",
interval = 1h);
C{sleep(1);}C
vtc.sleep(1s);
foo.remove_backend(backend=s1);
return (synth(200));
}
......@@ -61,7 +60,7 @@ varnish v1 -arg "-p vcc_allow_inline_c=true" -vcl+backend {
url = "/otherurl",
weight_update = "inthebody.*(\d+\.\d+)",
interval = 1h);
C{sleep(1);}C
vtc.sleep(1s);
return (synth(200));
}
if (req.url == "/3") {
......@@ -72,7 +71,7 @@ Host: weighthost
"},
weight_update = "^X-Weight: ([\d.]+)",
interval = 1h);
C{sleep(1);}C
vtc.sleep(1s);
return (synth(200));
}
return (synth(400));
......
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