Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use readers over closers in http input
The current http input plugin, when a body is specified, will produce a NopCloser. I believe this is because the gzip compression function returns a closer. However, this means that the HTTP request will not include the content-length. For that to happen, the request body must either be a string or bytes reader or bytes buffer. The primary reason to use a closer over those readers is in the event of a lot of data and trying to stay memory efficient. However, as the input plugin sends little data over http, the size should generally be small. Therefore, switch to bytes and string readers so that the http requests will always include the content length. fixes: influxdata#11034
- Loading branch information