client: Fix copying of request
This commit is contained in:
parent
1d20a6c3c8
commit
bd29d76f66
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user