aboutsummaryrefslogtreecommitdiff
path: root/mux.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2020-10-31 16:51:10 -0400
committerAdnan Maolood <[email protected]>2020-10-31 16:51:10 -0400
commit63b9b484d1e4250d3e373fdbbece84928a453943 (patch)
tree6c3d786c65af8b2bf9bd8c012bad2c868fd573ff /mux.go
parentAdd ErrCertificateNotFound (diff)
downloadgo-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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/mux.go b/mux.go
index 47aa618..81a4ee7 100644
--- a/mux.go
+++ b/mux.go
@@ -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
}