-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
406 response when POSTing to _bulk with a charset specified #28123
Comments
This is caused by #19388 where we enforced a strict content type header. In 5.x we only emitted deprecation warnings but since 6.0 we will enforce a "correct" In the current implementation it is only allowed to specify a media type in the Assigning to @jaymode for final clarification whether this was intentional in the implementation (IMHO it was intentional and we should not accept parameters ( |
Adding a charset to a Content-Type is correct according to spec (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17). I agree things get fuzzy if the charset ends up being ignored, but I don't like the idea of getting a error from a valid HTTP request. Edit: |
This is not the intended behavior as it is breaking. The changes in #19388 / #22691 sparked another issue regarding our handling of charset, #22769. Unfortunately we have not executed the plan outlined in that issue and unintentionally rejected the charset parameter for ndjson, #27065. There is also some discussion around this on a PR, #27301. |
I am having the same problem {"error":"Content-Type header [application/x-ndjson; charset=utf-8] is not supported","status":406} I have tried to compile Elastic from the source code, and run it with no changes. I have tried also to install a 5.5.0 with the same identical result here HTTP dump
Regards |
Interestingly, ES 6.x accepts |
is there a workaround for this? how can I post a multiline bulk request which is also utf-8? |
IMHO this should be re-opened. The referenced ticket #27065 was closed unsolved and references back here. In 7.3 the issue remains and is a problem for those of us (programming ABAP from SAP) who cannot minutely influence the headers. |
We discussed this issue in our weekly meeting. In order to move forward, the plan is to introduce the parsing of the charset parameter. The value will need to indicate a charset of |
This has been fixed during the 7.x series. There is an open follow up to use the charset of the request and only accept valid items but that will be handled separately. |
Elasticsearch version (
bin/elasticsearch --version
):6.1.1
Description of the problem including expected versus actual behavior:
406 response when sending a request to
_bulk
with a Content-Type that includes a charset encoding.This worked in 5.6.x
Steps to reproduce:
The text was updated successfully, but these errors were encountered: