From 805cd1046567aa8a8b97a8bfe9e7b411621f68b2 Mon Sep 17 00:00:00 2001 From: Erik Dubbelboer Date: Sat, 2 May 2026 07:11:35 +0200 Subject: [PATCH] Add note on MaxResponseBodySize compatibility with StreamResponseBody When `StreamResponseBody` is set the user is supposed to limit the reads they are doing themselves. Limiting the reads to `MaxResponseBodySize` would break backwards compatibility. --- client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client.go b/client.go index 62dc3f9..6482ab2 100644 --- a/client.go +++ b/client.go @@ -279,6 +279,8 @@ type Client struct { // and response body is greater than the limit. // // By default response body size is unlimited. + // + // Note that if StreamResponseBody is true, MaxResponseBodySize is ignored. MaxResponseBodySize int // Maximum duration for waiting for a free connection.