diff options
| author | adnano <[email protected]> | 2020-09-28 02:06:15 -0400 |
|---|---|---|
| committer | adnano <[email protected]> | 2020-09-28 02:06:15 -0400 |
| commit | b7e977f78add980d5c0e871db2486859c52b0674 (patch) | |
| tree | 48e7186363ca8b3c728c12c22d99a5fbec7bc205 | |
| parent | Add WithInput helper functions (diff) | |
| download | go-gemini-b7e977f78add980d5c0e871db2486859c52b0674.tar.xz go-gemini-b7e977f78add980d5c0e871db2486859c52b0674.zip | |
Don't trim trailing slash from Handler patterns
| -rw-r--r-- | server.go | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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, |