From 3ec861973ef12f046173da9fb134ddc10e7ab2b5 Mon Sep 17 00:00:00 2001 From: Jeevanandam M Date: Sat, 2 Nov 2024 11:03:20 -0700 Subject: [PATCH] from branch v2: fix: invalid memory address or nil pointer dereference in response logger (#872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Martin Jöhren --- middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.go b/middleware.go index 9bfe4cf2..d995018f 100644 --- a/middleware.go +++ b/middleware.go @@ -371,7 +371,7 @@ func responseDebugLogger(c *Client, res *Response) error { debugLog := res.Request.values[debugRequestLogKey].(string) debugLog += "~~~ RESPONSE ~~~\n" + fmt.Sprintf("STATUS : %s\n", res.Status()) + - fmt.Sprintf("PROTO : %s\n", res.RawResponse.Proto) + + fmt.Sprintf("PROTO : %s\n", res.Proto()) + fmt.Sprintf("RECEIVED AT : %v\n", res.ReceivedAt().Format(time.RFC3339Nano)) + fmt.Sprintf("TIME DURATION: %v\n", res.Time()) + "HEADERS :\n" +