[master] 2f05fe4 Serve ESI-includes from a different backend.
Martin Blix Grydeland
martin at varnish-software.com
Mon Mar 3 12:52:09 CET 2014
commit 2f05fe44f072373bd11da06b01586110412fc15c
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon Mar 3 12:51:22 2014 +0100
Serve ESI-includes from a different backend.
Serve ESI-includes from a different backend so that we don't race
against when the backend connection is ready for reuse.
Fixes: #1440
diff --git a/bin/varnishtest/tests/e00019.vtc b/bin/varnishtest/tests/e00019.vtc
index 1aeaa06..1010eab 100644
--- a/bin/varnishtest/tests/e00019.vtc
+++ b/bin/varnishtest/tests/e00019.vtc
@@ -22,13 +22,25 @@ server s1 {
chunked {<esi:comment/>}
chunkedlen 0
+} -start
+# The included object gets served from a different backend.
+# This is to avoid a race between when a backend connection
+# gets put up for reuse because of background fetches in
+# Varnish 4
+server s2 {
rxreq
expect req.url == "bar/foo"
txresp -body {<INCL>}
} -start
varnish v1 -vcl+backend {
+ sub vcl_backend_fetch {
+ if (bereq.url != "bar") {
+ set bereq.backend = s2;
+ }
+ }
+
sub vcl_backend_response {
if (bereq.url == "bar") {
set beresp.do_esi = true;
More information about the varnish-commit
mailing list