We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1644917 commit 29bb35eCopy full SHA for 29bb35e
1 file changed
src/cmd/go/internal/web/url_other.go
@@ -9,12 +9,11 @@ package web
9
import (
10
"errors"
11
"path/filepath"
12
+ "strings"
13
)
14
15
func convertFileURLPath(host, path string) (string, error) {
- switch host {
16
- case "", "localhost":
17
- default:
+ if host != "" && strings.EqualFold(host, "localhost") {
18
return "", errors.New("file URL specifies non-local host")
19
}
20
return filepath.FromSlash(path), nil
0 commit comments