[master] 06ffea873 Fold req.htt.host to lowercase by default.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Sep 9 14:15:06 UTC 2019
commit 06ffea8738b07b24de8ed0cd369f9229783b04ab
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Sep 9 14:13:54 2019 +0000
Fold req.htt.host to lowercase by default.
diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl
index ce4a5c445..a7e23f49a 100644
--- a/bin/varnishd/builtin.vcl
+++ b/bin/varnishd/builtin.vcl
@@ -35,6 +35,9 @@ vcl 4.0;
# Client side
sub vcl_recv {
+ if (req.http.host) {
+ set req.http.host = req.http.host.lower();
+ }
if (req.method == "PRI") {
/* This will never happen in properly formed traffic (see: RFC7540) */
return (synth(405));
diff --git a/bin/varnishtest/tests/u00010.vtc b/bin/varnishtest/tests/u00010.vtc
index dd37a15d0..9b92f0774 100644
--- a/bin/varnishtest/tests/u00010.vtc
+++ b/bin/varnishtest/tests/u00010.vtc
@@ -20,7 +20,7 @@ client c1 {
varnish v1 -vsl_catchup
-process p1 -expect-text 1 1 {list length 64}
+process p1 -expect-text 1 1 {list length 6}
process p1 -writehex 0c
More information about the varnish-commit
mailing list