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
influxdata#3593)

(cherry picked from commit 4f7afb8)
  • Loading branch information
danielnelson authored and charless-splunk committed Jun 19, 2018
1 parent b453384 commit 4ae88f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/outputs/influxdb/client/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,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 4ae88f2

Please sign in to comment.