Commit c7fd2e47 authored by Alejandro Sanchez's avatar Alejandro Sanchez
Browse files

jobcomp/elasticsearch - append Content-Type to the HTTP header.

The ability to enforce strict content-type checking has existed since
Elasticsearch 5.3 via the http.content_type.required configuration setting.
In 5.x it is optional, and defaults to false, in Elasticsearch 6.0, that
setting defaults to true, and there is no way to disable it.

If required and not appended, Elasticsearch would response with status 406,
so "Content-Type: application/json" is appended from now on. Tested against
Elasticsearch 5.5.1 and 6.1.1.

Bug reported to slurm-users list from E.S. Rosenberg. Patch suggested didn't
check the return code of curl_slist_append() and didn't free the slist.
parent b0116644
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment