diff options
| author | Adnan Maolood <[email protected]> | 2021-02-20 16:45:37 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-20 16:45:37 -0500 |
| commit | fadb2aed97e1012d5e7fac5d032401bf41b7e370 (patch) | |
| tree | 09355963a876257e40e60d25615d17fc7fd6c896 | |
| parent | Rename RedirectHandler to StatusHandler (diff) | |
| download | go-gemini-fadb2aed97e1012d5e7fac5d032401bf41b7e370.tar.xz go-gemini-fadb2aed97e1012d5e7fac5d032401bf41b7e370.zip | |
mux: Use StatusHandler instead of RedirectHandler
| -rw-r--r-- | mux.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -185,13 +185,13 @@ func (mux *ServeMux) Handler(r *Request) Handler { // If the given path is /tree and its handler is not registered, // redirect for /tree/. if u, ok := mux.redirectToPathSlash(muxKey{scheme, host, path}, r.URL); ok { - return RedirectHandler(StatusPermanentRedirect, u.String()) + return StatusHandler(StatusPermanentRedirect, u.String()) } if path != r.URL.Path { u := *r.URL u.Path = path - return RedirectHandler(StatusPermanentRedirect, u.String()) + return StatusHandler(StatusPermanentRedirect, u.String()) } mux.mu.RLock() |