diff options
| author | Adnan Maolood <[email protected]> | 2020-10-31 16:51:10 -0400 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2020-10-31 16:51:10 -0400 |
| commit | 63b9b484d1e4250d3e373fdbbece84928a453943 (patch) | |
| tree | 6c3d786c65af8b2bf9bd8c012bad2c868fd573ff /mux.go | |
| parent | Add ErrCertificateNotFound (diff) | |
| download | go-gemini-63b9b484d1e4250d3e373fdbbece84928a453943.tar.xz go-gemini-63b9b484d1e4250d3e373fdbbece84928a453943.zip | |
Remove Redirect and PermanentRedirect functions
Use (*ResponseWriter).WriteHeader instead.
Diffstat (limited to 'mux.go')
| -rw-r--r-- | mux.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -138,14 +138,14 @@ func (mux *ServeMux) Respond(w *ResponseWriter, r *Request) { // If the given path is /tree and its handler is not registered, // redirect for /tree/. if u, ok := mux.redirectToPathSlash(path, r.URL); ok { - Redirect(w, u.String()) + w.WriteHeader(StatusRedirect, u.String()) return } if path != r.URL.Path { u := *r.URL u.Path = path - Redirect(w, u.String()) + w.WriteHeader(StatusRedirect, u.String()) return } |