fix(measurex): avoid data race with HTTP request headers (#573)
Closes https://github.com/ooni/probe/issues/1859
This commit is contained in:
parent
aa27bbe33f
commit
60cfa68b5a
|
@ -513,7 +513,7 @@ func (mx *Measurer) httpClientDo(ctx context.Context,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req.Header = epnt.Header
|
req.Header = epnt.Header.Clone() // must clone because of parallel usage
|
||||||
const timeout = 15 * time.Second
|
const timeout = 15 * time.Second
|
||||||
ol := NewOperationLogger(mx.Logger,
|
ol := NewOperationLogger(mx.Logger,
|
||||||
"%s %s with %s/%s", req.Method, req.URL.String(), epnt.Address, epnt.Network)
|
"%s %s with %s/%s", req.Method, req.URL.String(), epnt.Address, epnt.Network)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user