From 6ce25f034af6f2699f3b9e6c10efa5a6dab1b50e Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Sat, 20 Jan 2024 23:17:13 +0100 Subject: [PATCH] fix body buffer dump --- dump.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump.go b/dump.go index 8a80f19..75355ae 100644 --- a/dump.go +++ b/dump.go @@ -61,7 +61,7 @@ func (r *bodyReader) Read(b []byte) (int, error) { if r.body.Len()+n > r.maxSize { r.body.Write(b[:r.maxSize-r.body.Len()]) } else { - r.body.Write(b) + r.body.Write(b[:n]) } } r.bytes += n