summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-11-24 19:50:18 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-11-24 19:50:28 +0000
commitfc777b5b2f82cbc65b5651a5afdd3b10b8bfd01f (patch)
tree82867a70a80830e04730d07aaef40be0921cf3f2 /server
parent58d2aec7c8e6d1710a8e0a370920bf4096a4ebc4 (diff)
downloadspacebeans-fc777b5b2f82cbc65b5651a5afdd3b10b8bfd01f.tar.gz
spacebeans-fc777b5b2f82cbc65b5651a5afdd3b10b8bfd01f.zip
Convert the hostname to lowercase when comparing
Why would the user set a case sensitive hostname? This should simplify things.
Diffstat (limited to 'server')
-rw-r--r--server/src/net/usebox/gemini/server/Server.scala3
1 files changed, 2 insertions, 1 deletions
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, _, _, _) =>