diff options
| author | Adnan Maolood <[email protected]> | 2021-02-24 09:48:23 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-24 09:48:23 -0500 |
| commit | bd29d76f668d29d5097c863a51bc1486f4edae88 (patch) | |
| tree | 0b9b6862cd7df76fec152239b1d5e2fdf2ccfe83 /client.go | |
| parent | examples/client: Use Response methods (diff) | |
| download | go-gemini-bd29d76f668d29d5097c863a51bc1486f4edae88.tar.xz go-gemini-bd29d76f668d29d5097c863a51bc1486f4edae88.zip | |
client: Fix copying of request
Diffstat (limited to 'client.go')
| -rw-r--r-- | client.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |