1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 08:50:56 +00:00

Ensure custom error handler is called

This commit is contained in:
Yanhui Shen 2019-03-13 16:24:04 +08:00
parent c2b6cb5c3a
commit be31bd2bbd

View File

@ -690,7 +690,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
// filter wrong http method
if !HTTPMETHOD[r.Method] {
http.Error(rw, "Method Not Allowed", http.StatusMethodNotAllowed)
exception("405", context)
goto Admin
}