Kibana: Send content-type for all requests to Elasticsearch

Created on 2 Feb 2017  路  13Comments  路  Source: elastic/kibana

We should send content-type: application/json on all requests beginning in 5.3. We need to confirm that this works as expected for bulk endpoints, which ES should accept even though they are not technically json. Starting in 6.0, this will be required, but 5.3 will introduce the ability for people to turn strict checking on in Elasticsearch, so we need to have this in place by then.

Operations blocker enhancement v5.3.0

Most helpful comment

Every request from Kibana 5.3 to ES 5.3 results in a warning in my /var/log/elasticsearch/CLUSTERNAME_deprecation.log file. How can I get rid of this warning?

[2017-04-04T13:58:13,302][WARN ][o.e.d.r.RestController ] The Content-Type [application/x-ldjson] has been superseded by [application/x-ndjson] in the specification and should be used instead.

All 13 comments

/cc @jbudz @tylersmalley

We need to use application/json whenever there is a request body, even for bulk endpoints. That Elasticsearch PR you linked is making it so application/json is accepted for that.

@epixa the pr he linked is making it so that application/x-ldjson (which is what esjs sends) and application/x-ndjson (from an updated proposal for new-line delimited json) are valid content-types for the bulk-formatted apis

Issue: https://github.com/elastic/elasticsearch/issues/22943

Code: https://github.com/jaymode/elasticsearch/blob/2a8570bdfe2fdb9b94a4018ab9369238049a3c78/core/src/main/java/org/elasticsearch/rest/RestController.java#L255-L256

@jbudz @spalger Did either of you check non-console requests? We need to wrap this up

I tested 5.3 from source, this LGTM from the kibana side

Every request from Kibana 5.3 to ES 5.3 results in a warning in my /var/log/elasticsearch/CLUSTERNAME_deprecation.log file. How can I get rid of this warning?

[2017-04-04T13:58:13,302][WARN ][o.e.d.r.RestController ] The Content-Type [application/x-ldjson] has been superseded by [application/x-ndjson] in the specification and should be used instead.

@grinabms This is fixed in 5.4, but we're trying to determine how risky it would be to backport the change into 5.3.x.

Every 10 seconds a warning, logging get very noisy, is there a way to supress that?

We released a fix for this deprecation warning problem in 5.3.1

Cool stuff, 5.3.1 out already?

Yep, it was released last week

Was this page helpful?
0 / 5 - 0 ratings