[master] 15f5c12 When the client abandons a fetch we close the connection to the backend if still in mid-transfer. With sufficiently small -bodylen, as in this test, that might or might not happen.

Poul-Henning Kamp phk at FreeBSD.org
Tue Mar 28 09:56:06 CEST 2017


commit 15f5c12d9945263027fd7493205120054af3d22a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Mar 28 07:36:22 2017 +0000

    When the client abandons a fetch we close the connection to the
    backend if still in mid-transfer.  With sufficiently small -bodylen,
    as in this test, that might or might not happen.
    
    Explicitly close from the server side, to stabilize this test.
    
    Fixes #2280

diff --git a/bin/varnishtest/tests/r02042.vtc b/bin/varnishtest/tests/r02042.vtc
index fcb79a6..8e59926 100644
--- a/bin/varnishtest/tests/r02042.vtc
+++ b/bin/varnishtest/tests/r02042.vtc
@@ -20,6 +20,9 @@ server s1 {
 	expect req.http.If-None-Match == <undef>
 	txresp -hdr "ETag: foo" -bodylen 7
 
+	close
+	accept
+
 	rxreq
 	expect req.url == "/lm"
 	txresp -hdr "Last-Modified: Thu, 26 Jun 2008 12:00:01 GMT" \
@@ -107,6 +110,8 @@ client c1 {
 	expect resp.http.X-Cache == "MISS"
 } -run
 
+varnish v1 -vsl_catchup
+
 # The next two tests are adapted from the former r01206.vtc, reflecting
 # changes for the recv->pass and beresp.uncacheable (hit-for-miss) cases
 # after rolling back the fix for #1206, and verifying that they are
@@ -125,6 +130,9 @@ server s1 {
 	expect req.http.If-None-Match == "foo"
 	txresp -hdr "ETag: foo" -bodylen 7
 
+	close
+	accept
+
 	rxreq
 	expect req.url == "/lm2"
 	txresp -hdr "Last-Modified: Thu, 26 Jun 2008 12:00:01 GMT" \
@@ -201,6 +209,9 @@ server s1 {
 	expect req.http.If-None-Match == <undef>
 	txresp -hdr "ETag: foo" -bodylen 7
 
+	close
+	accept
+
 	rxreq
 	expect req.url == "/lm3"
 	txresp -hdr "Last-Modified: Thu, 26 Jun 2008 12:00:01 GMT" \



More information about the varnish-commit mailing list