Turn requests lower case (to get rid of knot-resolver's mixed case)

This commit is contained in:
Star Brilliant
2017-11-16 15:47:42 +08:00
parent 6f78bd1ff0
commit f621d88d99
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -87,6 +87,7 @@ func (s *Server) handlerFunc(w http.ResponseWriter, r *http.Request) {
jsonDNS.FormatError(w, "Invalid argument value: \"name\"", 400)
return
}
name = strings.ToLower(name)
if punycode, err := idna.ToASCII(name); err == nil {
name = punycode
} else {