mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
sdk: header map copy to avoid race condition in #10301
This commit is contained in:
@@ -17,6 +17,7 @@ IMPROVEMENTS:
|
||||
|
||||
BUG FIXES:
|
||||
* agent: Only allow querying Prometheus formatted metrics if Prometheus is enabled within the config [[GH-10140](https://github.com/hashicorp/nomad/pull/10140)]
|
||||
* api: Fixed race condition around headers in API client [[GH-10302](https://github.com/hashicorp/nomad/issues/10302)]
|
||||
* api: Added missing devices block to AllocatedTaskResources [[GH-10064](https://github.com/hashicorp/nomad/pull/10064)]
|
||||
* cli: Fixed a bug where non-int proxy port would panic CLI [[GH-10072](https://github.com/hashicorp/nomad/issues/10072)]
|
||||
* cli: Fixed a bug where `nomad operator debug` incorrectly parsed https Consul API URLs. [[GH-10082](https://github.com/hashicorp/nomad/pull/10082)]
|
||||
|
||||
@@ -685,8 +685,8 @@ func (c *Client) newRequest(method, path string) (*request, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if c.config.Headers != nil {
|
||||
r.header = c.config.Headers
|
||||
for key, values := range c.config.Headers {
|
||||
r.header[key] = values
|
||||
}
|
||||
|
||||
return r, nil
|
||||
|
||||
4
vendor/github.com/hashicorp/nomad/api/api.go
generated
vendored
4
vendor/github.com/hashicorp/nomad/api/api.go
generated
vendored
@@ -685,8 +685,8 @@ func (c *Client) newRequest(method, path string) (*request, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if c.config.Headers != nil {
|
||||
r.header = c.config.Headers
|
||||
for key, values := range c.config.Headers {
|
||||
r.header[key] = values
|
||||
}
|
||||
|
||||
return r, nil
|
||||
|
||||
Reference in New Issue
Block a user