1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-03 03:10:18 +00:00

make golint happy

This commit is contained in:
astaxie
2015-09-08 21:41:38 +08:00
parent 61570ac2f7
commit 67b36d7c48
13 changed files with 94 additions and 88 deletions

View File

@ -770,10 +770,10 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
//if XSRF is Enable then check cookie where there has any cookie in the request's cookie _csrf
if EnableXSRF {
execController.XsrfToken()
execController.XSRFToken()
if r.Method == "POST" || r.Method == "DELETE" || r.Method == "PUT" ||
(r.Method == "POST" && (context.Input.Query("_method") == "DELETE" || context.Input.Query("_method") == "PUT")) {
execController.CheckXsrfCookie()
execController.CheckXSRFCookie()
}
}