Skip to content

Instantly share code, notes, and snippets.

@rezan
Created January 7, 2020 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezan/115dc943e0875cb2c5ef779871edd490 to your computer and use it in GitHub Desktop.
Save rezan/115dc943e0875cb2c5ef779871edd490 to your computer and use it in GitHub Desktop.
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