1
0
Fork 0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-03-29 03:00:10 +01: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
// the punycoded hostname
req = &Request{
URL: u,
}
r := new(Request)
*r = *req
r.URL = u
req = r
}
// Use request host if provided