Created
September 21, 2020 16:47
-
-
Save rezan/8b2960540ddaca369db7ee8ce0fdbb69 to your computer and use it in GitHub Desktop.
req.body and restarts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "req.body and restarts" | |
server s1 -repeat 4 { | |
rxreq | |
txresp -bodylen 1000 | |
} -start | |
varnish v1 -vcl+backend { | |
import std; | |
sub vcl_recv { | |
std.cache_req_body(1MB); | |
if (!req.restarts) { | |
return (pass); | |
} | |
return (hash); | |
} | |
sub vcl_backend_response { | |
set beresp.ttl = 0.1s; | |
} | |
sub vcl_deliver { | |
if (!req.restarts) { | |
return (restart); | |
} | |
} | |
} -start | |
client c1 { | |
txreq -req PUT -bodylen 2500 | |
rxresp | |
expect resp.status == 200 | |
delay 0.2 | |
txreq -req PUT -bodylen 2500 | |
rxresp | |
expect resp.status == 200 | |
} -run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment