1
0
Fork 0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-04-27 16:55:09 +02:00

client: Fix copying of request

This commit is contained in:
Adnan Maolood 2021-02-24 09:48:23 -05:00
parent 1d20a6c3c8
commit bd29d76f66

View File

@ -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 // Use the new URL in the request so that the server gets
// the punycoded hostname // the punycoded hostname
req = &Request{ r := new(Request)
URL: u, *r = *req
} r.URL = u
req = r
} }
// Use request host if provided // Use request host if provided