update code to return prefix on empty path

pull/1093/head
Sujit 2020-12-28 10:26:56 +05:45
parent 0fed63deb3
commit 71e4485c22
1 changed files with 2 additions and 2 deletions

View File

@ -208,11 +208,11 @@ func setETag(c *Ctx, weak bool) {
}
func getGroupPath(prefix, path string) string {
if path == "/" {
if len(path) == 0 || path == "/" {
return prefix
}
if len(path) > 0 && path[0] != '/' {
if path[0] != '/' {
path = "/" + path
}