Don't trim trailing slash from Handler patterns

This commit is contained in:
adnano 2020-09-28 02:06:15 -04:00
parent 70c5d8b9ce
commit b7e977f78a

View File

@ -361,10 +361,6 @@ func (m *ServeMux) Handle(pattern string, handler Handler) {
if err != nil {
panic(err)
}
// Trim trailing slash from URL path
if len(url.Path) != 0 && url.Path[len(url.Path)-1] == '/' {
url.Path = url.Path[:len(url.Path)-1]
}
e := muxEntry{
url,
handler,