Commit 2f05fe44 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

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
parent 2edbe43f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment