Skip to content

Commit c48df9b

Browse files
committed
fix: PrintResponseDebug reference Writer from input args
1 parent 4f7c904 commit c48df9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/requests/requests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,15 @@ func (r *RequestConfig) PrintResponseDebug(w io.Writer, resp *http.Response) {
251251

252252
for i, cert := range resp.TLS.PeerCertificates {
253253
fmt.Fprintf(w, "Certificate %d:\n", i)
254-
certinfo.PrintCertInfo(cert, 1, os.Stdout)
254+
certinfo.PrintCertInfo(cert, 1, w)
255255
}
256256

257257
for i, chain := range resp.TLS.VerifiedChains {
258258
fmt.Fprintf(w, "Verified Chain %d:\n", i)
259259

260260
for j, cert := range chain {
261261
fmt.Fprintf(w, " Cert %d:\n", j)
262-
certinfo.PrintCertInfo(cert, 2, os.Stdout)
262+
certinfo.PrintCertInfo(cert, 2, w)
263263
}
264264
}
265265
} else {

0 commit comments

Comments
 (0)