Skip to content

Instantly share code, notes, and snippets.

@rezan
Created January 7, 2020 19:50
Embed
What would you like to do?
Request POST body timeout
varnishtest "Test HTTP Post timeout"
server s1 -repeat 3 {
rxreq
txresp
expect req.body == "postdata is here"
} -start
varnish v1 -arg "-p timeout_idle=3.0" -vcl+backend {
sub vcl_recv {
}
} -start
client c1 {
txreq -req POST -hdr "req: 1" -body "postdata is here"
rxresp
expect resp.status == 200
txreq -req POST -hdr "req: 2" -hdr "Content-Length: 16"
delay 2.0
send "postdata is here"
rxresp
expect resp.status == 200
txreq -req POST -hdr "req: 3" -hdr "Content-Length: 16"
delay 4.0
send "postdata is here"
rxresp
expect resp.status == 200
} -run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment