1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 08:00:40 +00:00

refactor controller.go

This commit is contained in:
fud
2015-12-21 16:23:31 +08:00
parent c43e3d6684
commit 92711e80a3
4 changed files with 62 additions and 75 deletions

View File

@ -315,7 +315,7 @@ func (input *BeegoInput) Session(key interface{}) interface{} {
// CopyBody returns the raw request body data as bytes.
func (input *BeegoInput) CopyBody(MaxMemory int64) []byte {
safe := &io.LimitedReader{R:input.Context.Request.Body, N:MaxMemory}
safe := &io.LimitedReader{R: input.Context.Request.Body, N: MaxMemory}
requestbody, _ := ioutil.ReadAll(safe)
input.Context.Request.Body.Close()
bf := bytes.NewBuffer(requestbody)