Do not allow the same header map to be shared across requests. (#7690)

This commit is contained in:
ncabatoff 2019-10-17 11:48:15 -04:00 committed by GitHub
parent a68f67a1f3
commit 9a3369c566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -673,7 +673,6 @@ func (c *Client) NewRequest(method, requestPath string) *Request {
token := c.token
mfaCreds := c.mfaCreds
wrappingLookupFunc := c.wrappingLookupFunc
headers := c.headers
policyOverride := c.policyOverride
c.modifyLock.RUnlock()
@ -718,10 +717,7 @@ func (c *Client) NewRequest(method, requestPath string) *Request {
req.WrapTTL = DefaultWrappingLookupFunc(method, lookupPath)
}
if headers != nil {
req.Headers = headers
}
req.Headers = c.Headers()
req.PolicyOverride = policyOverride
return req