Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning when having charset in the request Content-Type #27065

Closed
Pyppe opened this issue Oct 20, 2017 · 3 comments
Closed

Deprecation warning when having charset in the request Content-Type #27065

Pyppe opened this issue Oct 20, 2017 · 3 comments
Labels
>bug :Core/Infra/REST API REST infrastructure and utilities

Comments

@Pyppe
Copy link

Pyppe commented Oct 20, 2017

Elasticsearch version: 5.6.3

Plugins installed: []

JVM version: 1.8.0_144

OS version: macOS Sierra 10.12.6 (Darwin Kernel Version 16.7.0)

Description of the problem including expected versus actual behavior:
We get a deprecation warning if using Content-Type: application/x-ndjson; charset=UTF-8 header for the Bulk API. That is, the server only checks if the Content-Type === "application/x-ndjson" and otherwise complains about missing Content-Type.

Steps to reproduce:

curl -XPOST 'localhost:9200/_bulk?pretty' -H 'Content-Type: application/x-ndjson; charset=UTF-8' -d'
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }
'

Provide logs (if relevant):

[WARN ][o.e.d.r.RestController   ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
@Pyppe
Copy link
Author

Pyppe commented Oct 20, 2017

Opened this issue as a result of #22769 (comment).

@spinscale spinscale added :Core/Infra/REST API REST infrastructure and utilities discuss labels Oct 23, 2017
@javanna javanna removed the discuss label Oct 27, 2017
@javanna
Copy link
Member

javanna commented Oct 27, 2017

We should definitely not issue a deprecation warning when Content-Type includes the charset. Another story is what we do with the charset, see #22769 .

@ebadyano
Copy link
Contributor

Closing as 5.x isn't maintained anymore and the behaviour on 6.x is tracked under #28123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/REST API REST infrastructure and utilities
Projects
None yet
Development

No branches or pull requests

4 participants