From a8b541f07c1617cee2d101cc664aa06dcc1aeba1 Mon Sep 17 00:00:00 2001 From: Ofek Lavie Date: Tue, 29 Apr 2025 14:04:48 +0300 Subject: [PATCH] Close response body It seems as though upon success, the http response body isn't closed --- internal/requestconfig/requestconfig.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 8d5f77ec..5587f3d5 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -508,6 +508,7 @@ func (cfg *RequestConfig) Execute() (err error) { } contents, err := io.ReadAll(res.Body) + res.Body.Close() if err != nil { return fmt.Errorf("error reading response body: %w", err) }