Handle relative URLs with empty path

This commit is contained in:
Christian Muehlhaeuser
2019-12-10 10:49:46 +01:00
parent cc218713f7
commit 81d39f19bc
+1 -1
View File
@@ -163,7 +163,7 @@ func resolveRelativeURL(baseURL string, rel string) string {
if u.IsAbs() {
return rel
}
if u.Path[0] == '/' {
if len(u.Path) > 0 && u.Path[0] == '/' {
u.Path = u.Path[1:]
}