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