diff --git a/config.go b/config.go index bb2a768..ff877d6 100644 --- a/config.go +++ b/config.go @@ -152,6 +152,8 @@ func readconfig(configPath string) error { config.fcgiPools = make(map[string]gofast.ConnFactory) for hostname, host := range config.Hosts { + hostname = strings.ToLower(hostname) + if defaultHost != nil { if host.Cert == "" { host.Cert = defaultHost.Cert diff --git a/server.go b/server.go index 4025483..e1ab0f0 100644 --- a/server.go +++ b/server.go @@ -389,6 +389,10 @@ func handleConn(c *tls.Conn) { return } + if request.Scheme == "gemini" { + request.Host = strings.ToLower(request.Host) + } + status, size, logPath = handleRequest(c, request, requestData) }