From bd29d76f668d29d5097c863a51bc1486f4edae88 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Wed, 24 Feb 2021 09:48:23 -0500 Subject: [PATCH] client: Fix copying of request --- client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 2020e3d..86eb844 100644 --- a/client.go +++ b/client.go @@ -77,9 +77,10 @@ func (c *Client) Do(ctx context.Context, req *Request) (*Response, error) { // Use the new URL in the request so that the server gets // the punycoded hostname - req = &Request{ - URL: u, - } + r := new(Request) + *r = *req + r.URL = u + req = r } // Use request host if provided