mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 18:20:50 +00:00
fix #2725 big form
This commit is contained in:
parent
4cfb3678f8
commit
7ec819deed
@ -19,6 +19,7 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"regexp"
|
||||
@ -353,7 +354,7 @@ func (input *BeegoInput) CopyBody(MaxMemory int64) []byte {
|
||||
requestbody, _ := ioutil.ReadAll(safe)
|
||||
input.Context.Request.Body.Close()
|
||||
bf := bytes.NewBuffer(requestbody)
|
||||
input.Context.Request.Body = ioutil.NopCloser(bf)
|
||||
input.Context.Request.Body = http.MaxBytesReader(input.Context.ResponseWriter, ioutil.NopCloser(bf), MaxMemory)
|
||||
input.RequestBody = requestbody
|
||||
return requestbody
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user