common: revert some changes from #2121 for Windows

This commit is contained in:
Mitchell Hashimoto 2015-06-13 10:20:54 -04:00
parent 8b4f980123
commit 1e853f9f1f
1 changed files with 8 additions and 0 deletions

View File

@ -99,6 +99,14 @@ func DownloadableURL(original string) (string, error) {
// Make sure it is lowercased
url.Scheme = strings.ToLower(url.Scheme)
// This is to work around issue #5927. This can safely be removed once
// we distribute with a version of Go that fixes that bug.
//
// See: https://code.google.com/p/go/issues/detail?id=5927
if url.Path != "" && url.Path[0] != '/' {
url.Path = "/" + url.Path
}
// Verify that the scheme is something we support in our common downloader.
supported := []string{"file", "http", "https"}
found := false