diff --git a/common/buf/multi_buffer.go b/common/buf/multi_buffer.go index 758c88264..6f92717cd 100644 --- a/common/buf/multi_buffer.go +++ b/common/buf/multi_buffer.go @@ -47,6 +47,9 @@ func ReadAllToBytes(reader io.Reader) ([]byte, error) { if err != nil { return nil, err } + if mb.Len() == 0 { + return nil, nil + } b := make([]byte, mb.Len()) common.Must2(mb.Read(b)) mb.Release()