diff --git a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go index 1be13d27..592f2656 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go @@ -239,6 +239,7 @@ func (t Transport) bufferBody(req io.Reader) (int64, io.ReadCloser, error) { size, err := io.CopyN(memBuf, req, t.BodyBufferMemoryLimit) var body bufferedBody // should be closed in case buffering fails body.memBuf = memBuf + body.tempFileLimiter = t.tempFileLimiter // error while reading the body if err != nil { // fully buffered in memory