Skip to content

Commit

Permalink
fix the issue beego#1573
Browse files Browse the repository at this point in the history
  • Loading branch information
astaxie committed Jan 18, 2016
1 parent fa8f6e5 commit 23bb36d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,13 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
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
if BConfig.WebConfig.Session.SessionOn {
var err error
Expand All @@ -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) {
goto Admin
}
Expand Down

0 comments on commit 23bb36d

Please sign in to comment.