mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-09-29 20:41:16 +02:00
Don't trim trailing slash from Handler patterns
This commit is contained in:
parent
70c5d8b9ce
commit
b7e977f78a
@ -361,10 +361,6 @@ func (m *ServeMux) Handle(pattern string, handler Handler) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
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{
|
e := muxEntry{
|
||||||
url,
|
url,
|
||||||
handler,
|
handler,
|
||||||
|
Loading…
Reference in New Issue
Block a user