filter http method fix #279
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | @@ -311,6 +311,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) | ... | @@ -311,6 +311,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) |
| 311 | context.Input.CruSession = GlobalSessions.SessionStart(w, r) | 311 | context.Input.CruSession = GlobalSessions.SessionStart(w, r) |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | if !inSlice(strings.ToLower(r.Method), HTTPMETHOD) { | ||
| 315 | http.Error(w, "Method Not Allowed", 405) | ||
| 316 | return | ||
| 317 | } | ||
| 318 | |||
| 314 | var runrouter *controllerInfo | 319 | var runrouter *controllerInfo |
| 315 | var findrouter bool | 320 | var findrouter bool |
| 316 | 321 | ... | ... |
-
Please register or sign in to post a comment