router: Use http.StatusText
diff --git a/router.go b/router.go index 759254b..3a562bd 100644 --- a/router.go +++ b/router.go
@@ -320,7 +320,10 @@ } if handle, _, _ := r.trees[method].getValue(req.URL.Path); handle != nil { - http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) + http.Error(w, + http.StatusText(http.StatusMethodNotAllowed), + http.StatusMethodNotAllowed, + ) return } }