1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-14 13:33:32 +00:00

Merge pull request #3567 from bsdelf/feature/ensure-custom-error-handler

Ensure custom error handler is called
This commit is contained in:
astaxie 2019-03-26 19:22:54 +08:00 committed by GitHub
commit 8535ec0819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}