Commit 9e4d886a authored by astaxie's avatar astaxie

filter http method fix #279

parent b6446659
......@@ -311,6 +311,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
context.Input.CruSession = GlobalSessions.SessionStart(w, r)
}
if !inSlice(strings.ToLower(r.Method), HTTPMETHOD) {
http.Error(w, "Method Not Allowed", 405)
return
}
var runrouter *controllerInfo
var findrouter bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment