Skip to content

Commit e11af35

Browse files
authored
fix: invalid memory address or nil pointer dereference in response logger (#872)
1 parent 231ca0e commit e11af35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

middleware.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func responseLogger(c *Client, res *Response) error {
375375
debugLog := res.Request.values[debugRequestLogKey].(string)
376376
debugLog += "~~~ RESPONSE ~~~\n" +
377377
fmt.Sprintf("STATUS : %s\n", res.Status()) +
378-
fmt.Sprintf("PROTO : %s\n", res.RawResponse.Proto) +
378+
fmt.Sprintf("PROTO : %s\n", res.Proto()) +
379379
fmt.Sprintf("RECEIVED AT : %v\n", res.ReceivedAt().Format(time.RFC3339Nano)) +
380380
fmt.Sprintf("TIME DURATION: %v\n", res.Time()) +
381381
"HEADERS :\n" +

0 commit comments

Comments
 (0)