mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 18:10:54 +00:00
fix the issue #1573
This commit is contained in:
parent
fa8f6e5a53
commit
23bb36d35c
14
router.go
14
router.go
@ -640,6 +640,13 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
goto Admin
|
goto Admin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.Method != "GET" && r.Method != "HEAD" {
|
||||||
|
if BConfig.CopyRequestBody && !context.Input.IsUpload() {
|
||||||
|
context.Input.CopyBody(BConfig.MaxMemory)
|
||||||
|
}
|
||||||
|
context.Input.ParseFormOrMulitForm(BConfig.MaxMemory)
|
||||||
|
}
|
||||||
|
|
||||||
// session init
|
// session init
|
||||||
if BConfig.WebConfig.Session.SessionOn {
|
if BConfig.WebConfig.Session.SessionOn {
|
||||||
var err error
|
var err error
|
||||||
@ -656,13 +663,6 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.Method != "GET" && r.Method != "HEAD" {
|
|
||||||
if BConfig.CopyRequestBody && !context.Input.IsUpload() {
|
|
||||||
context.Input.CopyBody(BConfig.MaxMemory)
|
|
||||||
}
|
|
||||||
context.Input.ParseFormOrMulitForm(BConfig.MaxMemory)
|
|
||||||
}
|
|
||||||
|
|
||||||
if p.execFilter(context, BeforeRouter, urlPath) {
|
if p.execFilter(context, BeforeRouter, urlPath) {
|
||||||
goto Admin
|
goto Admin
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user