diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-05 16:02:52 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-05 16:02:44 +0200 |
commit | bea9280fb35b156062e63afffd9d85ac5aac88f5 (patch) | |
tree | 4b70a598d06bdcefb2b2aba295c19c111b65235e /helpers/url.go | |
parent | bef3df7481027254a6711965828cd120fa5deb7c (diff) |
Do not add trailing slash to baseURL
Fixes #1105
Diffstat (limited to 'helpers/url.go')
-rw-r--r-- | helpers/url.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helpers/url.go b/helpers/url.go index 13421632f..c780579d6 100644 --- a/helpers/url.go +++ b/helpers/url.go @@ -77,7 +77,7 @@ func sanitizeURLWithFlags(in string, f purell.NormalizationFlags) string { if err != nil { panic(err) } - if !strings.HasPrefix(u.Path, "/") { + if len(u.Path) > 0 && !strings.HasPrefix(u.Path, "/") { u.Path = "/" + u.Path } return u.String() |