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.
This commit is contained in:
Erik Dubbelboer
2026-05-02 07:11:35 +02:00
parent 5b5c1be52c
commit 805cd10465
+2
View File
@@ -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.