Skip to content

Commit

Permalink
Set content-type charset in influxdb output and allow it be overridden (
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Dec 29, 2017
1 parent ef6e5c5 commit 4f7afb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/outputs/influxdb/client/http.go
Expand Up @@ -211,11 +211,12 @@ func (c *httpClient) makeRequest(uri string, body io.Reader) (*http.Request, err
return nil, err
}

req.Header.Set("Content-Type", "text/plain; charset=utf-8")

for header, value := range c.config.HTTPHeaders {
req.Header.Set(header, value)
}

req.Header.Set("Content-Type", "text/plain")
req.Header.Set("User-Agent", c.config.UserAgent)
if c.config.Username != "" && c.config.Password != "" {
req.SetBasicAuth(c.config.Username, c.config.Password)
Expand Down

0 comments on commit 4f7afb8

Please sign in to comment.