[master] cd2e297 Reflect new C: close default in vcl_pipe
Lasse Karstensen
lkarsten at varnish-software.com
Thu Mar 20 11:28:51 CET 2014
commit cd2e297fabde5356d906abb9d44f803263bcd730
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date: Thu Mar 20 11:20:50 2014 +0100
Reflect new C: close default in vcl_pipe
We now set Connection: Close on all piped backend requests, to avoid some of
the debugging pain seen over the last 2-3 years.
Basic problem is that request backend routing done in vcl_recv would not be
honored for subsequent requests after one was piped.
This was, at least for new users, a rather nasty surprise.
Original change in commit 880c3c2.
diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl
index 8e5ca36..3949689 100644
--- a/bin/varnishd/builtin.vcl
+++ b/bin/varnishd/builtin.vcl
@@ -67,12 +67,11 @@ sub vcl_recv {
}
sub vcl_pipe {
- # Note that only the first request to the backend will have
- # X-Forwarded-For set. If you use X-Forwarded-For and want to
- # have it set for all requests, make sure to have:
- # set bereq.http.connection = "close";
- # here. It is not set by default as it might break some broken web
- # applications, like IIS with NTLM authentication.
+ # By default Connection: close is set on all piped requests, to stop
+ # connection reuse from sending future requests directly to the
+ # (potentially) wrong backend. If you do want this to happen, you can undo
+ # it here.
+ # unset bereq.http.connection;
return (pipe);
}
More information about the varnish-commit
mailing list