From b6c0ba24cf5902e6bafff4243979bb12010aa142 Mon Sep 17 00:00:00 2001 From: tjp Date: Wed, 10 Jan 2024 11:06:53 -0700 Subject: add a *Request to Response --- gemini/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gemini/client.go') diff --git a/gemini/client.go b/gemini/client.go index c60e92e..00e28f6 100644 --- a/gemini/client.go +++ b/gemini/client.go @@ -29,7 +29,7 @@ type Client struct { // NewClient creates a gemini Client with the given TLS configuration and default MaxRedirects. func NewClient(tlsConf *tls.Config) Client { - if tlsConf != nil { + if tlsConf != nil && !tlsConf.InsecureSkipVerify { tlsConf = tlsConf.Clone() tlsConf.InsecureSkipVerify = true } @@ -116,6 +116,7 @@ func (client Client) RoundTrip(request *types.Request) (*types.Response, error) return nil, err } response.Body = bytes.NewBuffer(bodybuf) + response.Request = request return response, nil } -- cgit v1.2.3