From fc777b5b2f82cbc65b5651a5afdd3b10b8bfd01f Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 24 Nov 2021 19:50:18 +0000 Subject: Convert the hostname to lowercase when comparing Why would the user set a case sensitive hostname? This should simplify things. --- server/src/net/usebox/gemini/server/Server.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/src') diff --git a/server/src/net/usebox/gemini/server/Server.scala b/server/src/net/usebox/gemini/server/Server.scala index 5b1692f..42a097c 100644 --- a/server/src/net/usebox/gemini/server/Server.scala +++ b/server/src/net/usebox/gemini/server/Server.scala @@ -73,7 +73,8 @@ case class Server(conf: ServiceConf) { uri.getHost(), uri.getPath().decode(), vHosts.find(vh => - Some(vh.host) == Option(uri.getHost()).map(_.toLowerCase) + Some(vh.host.toLowerCase) == Option(uri.getHost()) + .map(_.toLowerCase) ) ) match { case (null, _, _, _) => -- cgit v1.2.3