mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
set temp file limiter for buffered body
This commit is contained in:
parent
02b8640e44
commit
7d483ff3ef
1 changed files with 1 additions and 0 deletions
|
@ -239,6 +239,7 @@ func (t Transport) bufferBody(req io.Reader) (int64, io.ReadCloser, error) {
|
||||||
size, err := io.CopyN(memBuf, req, t.BodyBufferMemoryLimit)
|
size, err := io.CopyN(memBuf, req, t.BodyBufferMemoryLimit)
|
||||||
var body bufferedBody // should be closed in case buffering fails
|
var body bufferedBody // should be closed in case buffering fails
|
||||||
body.memBuf = memBuf
|
body.memBuf = memBuf
|
||||||
|
body.tempFileLimiter = t.tempFileLimiter
|
||||||
// error while reading the body
|
// error while reading the body
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// fully buffered in memory
|
// fully buffered in memory
|
||||||
|
|
Loading…
Reference in a new issue