From 6566b74f5e2c73f0475b57a57e3ac7230d90de0a Mon Sep 17 00:00:00 2001 From: Dasmat13 Date: Wed, 15 Apr 2026 04:04:05 +0530 Subject: [PATCH] fix(pull): output HTTP logs when debug flag is used Fixes #31098 by adding debug logging directly to the HTTPGetter, explicitly outputting the URL being fetched and the response URL along with the status code. Signed-off-by: Dasmat13 --- pkg/getter/httpgetter.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/getter/httpgetter.go b/pkg/getter/httpgetter.go index 2eb2d5d8c..48c09145a 100644 --- a/pkg/getter/httpgetter.go +++ b/pkg/getter/httpgetter.go @@ -88,13 +88,17 @@ func (g *HTTPGetter) get(href string, opts getterOptions) (*bytes.Buffer, error) return nil, err } - slog.Debug("fetching", "url", href) + slog.Debug("fetching chart", "url", href) resp, err := client.Do(req) if err != nil { return nil, err } defer resp.Body.Close() - slog.Debug("fetch complete", "url", href, "status", resp.Status, "content-length", resp.ContentLength) + if resp.Request != nil && resp.Request.URL != nil { + slog.Debug("chart fetch response", "url", resp.Request.URL.String(), "status", resp.Status, "content-length", resp.ContentLength) + } else { + slog.Debug("chart fetch response", "status", resp.Status, "content-length", resp.ContentLength) + } if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("failed to fetch %s : %s", href, resp.Status) }