Try to fix mysterious test failures on Travis

This commit is contained in:
bep committed 2015-01-23 00:36:47 +01:00
1 parent 01ec44a6b4
commit 71fe85df9b
1 file changed
+1 -1
+1 -1
View File
@@ -146,7 +146,7 @@ func fixUrl(s string) (string, error) {
if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") { if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") {
s = "http://" + s s = "http://" + s
} }
if !strings.HasSuffix(s, "/") { if len(s) > 0 && !strings.HasSuffix(s, "/") {
s = s + "/" s = s + "/"
} }
u, err := url.Parse(s) u, err := url.Parse(s)