update value.tsr match rule

This commit is contained in:
qm012 2021-07-06 16:21:44 +08:00
parent 085b582bea
commit a3ee271287

View File

@ -610,7 +610,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 == "/" ||
(path == prefix[:len(prefix)-1] && n.handlers != nil)
(len(prefix) == len(path)+1 && n.handlers != nil)
return
}
}