aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-09-28 02:06:15 -0400
committeradnano <[email protected]>2020-09-28 02:06:15 -0400
commitb7e977f78add980d5c0e871db2486859c52b0674 (patch)
tree48e7186363ca8b3c728c12c22d99a5fbec7bc205
parentAdd WithInput helper functions (diff)
downloadgo-gemini-b7e977f78add980d5c0e871db2486859c52b0674.tar.xz
go-gemini-b7e977f78add980d5c0e871db2486859c52b0674.zip
Don't trim trailing slash from Handler patterns
-rw-r--r--server.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/server.go b/server.go
index 0f5706d..ac7e366 100644
--- a/server.go
+++ b/server.go
@@ -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,