Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbep <bjorn.erik.pedersen@gmail.com>2015-01-23 02:36:47 +0300
committerbep <bjorn.erik.pedersen@gmail.com>2015-01-23 02:36:47 +0300
commit71fe85df9b7193f790fbb5e3af415b176fdb6a4f (patch)
tree4c42fa22aaebc79ff7ae79f0578dbbef98357b3e
parent01ec44a6b40b7a278d4e3fdc52a4456e80e0950b (diff)
Try to fix mysterious test failures on Travis
-rw-r--r--commands/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/server.go b/commands/server.go
index 98ea60f4e..6ce679c6e 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -146,7 +146,7 @@ func fixUrl(s string) (string, error) {
if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") {
s = "http://" + s
}
- if !strings.HasSuffix(s, "/") {
+ if len(s) > 0 && !strings.HasSuffix(s, "/") {
s = s + "/"
}
u, err := url.Parse(s)