[master] 3ca71eb Add testcase for #2275
Poul-Henning Kamp
phk at FreeBSD.org
Thu Mar 23 14:36:06 CET 2017
commit 3ca71ebe745f3806f3c0ec3cf5f749688de2c2ab
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Mar 23 13:29:28 2017 +0000
Add testcase for #2275
diff --git a/bin/varnishtest/tests/r02275.vtc b/bin/varnishtest/tests/r02275.vtc
new file mode 100644
index 0000000..5458832
--- /dev/null
+++ b/bin/varnishtest/tests/r02275.vtc
@@ -0,0 +1,39 @@
+varnishtest "Chunked with no space for iov's on workspace"
+
+server s1 -repeat 2 {
+ rxreq
+ txresp -nolen -hdr "Transfer-encoding: chunked"
+ delay 1
+ chunkedlen 10
+ delay .1
+ chunkedlen 10
+ delay .1
+ chunkedlen 0
+} -start
+
+varnish v1 -vcl+backend {
+ import debug;
+
+ sub vcl_deliver {
+ if (req.url == "/1") {
+ debug.workspace_allocate(client,
+ -1 * (40 + debug.typesize("p") * 25));
+ } else {
+ debug.workspace_allocate(client,
+ -1 * (48 + debug.typesize("p") * 25));
+ }
+ set resp.http.foo = debug.workspace_free(client);
+ }
+} -start
+
+client c1 {
+ txreq -url /1
+ rxresp
+ expect resp.status == 500
+} -run
+client c1 {
+ txreq -url /2
+ rxresp
+ expect resp.status == 200
+} -run
+
More information about the varnish-commit
mailing list