Skip to content

Commit

Permalink
fix the misplacement of adding slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen233 committed Aug 29, 2021
1 parent 4e75841 commit fc62633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tree.go
Expand Up @@ -599,7 +599,7 @@ walk: // Outer loop for walking the tree
// Nothing found. We can recommend to redirect to the same URL with an
// extra trailing slash if a leaf exists for that path
value.tsr = path == "/" ||
(len(prefix) == len(path)+1 && n.handlers != nil)
(len(prefix) == len(path)+1 && path == prefix[:len(prefix) - 1] && n.handlers != nil)
return
}
}
Expand Down

0 comments on commit fc62633

Please sign in to comment.