Skip to content

Commit

Permalink
vtest30
Browse files Browse the repository at this point in the history
  • Loading branch information
qm012 committed Jul 6, 2021
1 parent 82f3c92 commit c770023
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,8 @@ 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 && prefix[len(path)] == '/' &&
path == prefix[:len(prefix)-1] && n.handlers != nil)
value.tsr = path == "/" ||
(n.handlers != nil && path == prefix[:len(prefix)-1])
return
}
}
Expand Down

0 comments on commit c770023

Please sign in to comment.