From 9a3369c566737caebdca4d8649ad99fc72c5d650 Mon Sep 17 00:00:00 2001 From: ncabatoff Date: Thu, 17 Oct 2019 11:48:15 -0400 Subject: [PATCH] Do not allow the same header map to be shared across requests. (#7690) --- api/client.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/client.go b/api/client.go index 216e8d22d9..ff27eff657 100644 --- a/api/client.go +++ b/api/client.go @@ -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