[master] 82f073574 Test case that buffers fully before starting to consume the req body

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Aug 30 08:31:09 UTC 2021


commit 82f073574185b8e1f60f5fe1675a2993917f95ff
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Tue Jun 22 11:50:03 2021 +0200

    Test case that buffers fully before starting to consume the req body

diff --git a/bin/varnishtest/tests/t02019.vtc b/bin/varnishtest/tests/t02019.vtc
new file mode 100644
index 000000000..3adcf2603
--- /dev/null
+++ b/bin/varnishtest/tests/t02019.vtc
@@ -0,0 +1,43 @@
+varnishtest "H/2 stream early buffer exhaustion"
+
+barrier b1 sock 2
+
+server s1 {
+	rxreq
+	txresp
+} -start
+
+varnish v1 -vcl+backend {
+	import vtc;
+	sub vcl_recv {
+		vtc.barrier_sync("${b1_sock}");
+		vtc.sleep(0.1s);
+	}
+} -start
+
+varnish v1 -cliok "param.set feature +http2"
+varnish v1 -cliok "param.reset h2_initial_window_size"
+varnish v1 -cliok "param.reset h2_rx_window_low_water"
+
+client c1 {
+	stream 1 {
+		txreq -req POST -url /1 -hdr "content-length" "131072" -nostrend
+		txdata -datalen 16384 -nostrend
+		txdata -datalen 16384 -nostrend
+		txdata -datalen 16384 -nostrend
+		txdata -datalen 16383 -nostrend
+		barrier b1 sync
+		rxwinup
+		txdata -datalen 16384 -nostrend
+		rxwinup
+		txdata -datalen 16384 -nostrend
+		rxwinup
+		txdata -datalen 16384 -nostrend
+		rxwinup
+		txdata -datalen 16384 -nostrend
+		rxwinup
+		txdata -datalen 1
+		rxresp
+		expect resp.status == 200
+	} -run
+} -run


More information about the varnish-commit mailing list