commit | 99873563b6bbe559753ca32caec04480843fbb0f | [log] [tgz] |
---|---|---|
author | Julien Schmidt <github@julienschmidt.com> | Sun Jan 04 13:56:41 2015 +0800 |
committer | Julien Schmidt <github@julienschmidt.com> | Sun Jan 04 13:56:41 2015 +0800 |
tree | 730681c6eaaebb2cbfb63e02d555eb6ba3ad8ddd | |
parent | 613505640f7c90be3c0968127d021bc9ccf841f7 [diff] |
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 } }