You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some applications like PowerShell's Invoke-RestMethod count on charset information to display data correctly. An undocumented breaking change in 8.0 may cause applications to show non-ASCII characters incorrectly:
From version 8.0.0, Elasticsearch does not send the Content-Type response header as application/json;charset=utf-8 but simply application/json. According to RFC 8259, sending the charset information is not required when transferring JSON data, as UTF is the default encoding.
The workaround is for clients to include Accept: application/json; charset=UTF-8 header in requests.
We believe this came as a side effect of content-type parsing refactoring needed for the REST API compatibility added in 8.0 (#61427).
This is a request to confirm the above finding and add the change to our breaking changes documentation. Thx!
Steps to Reproduce
version 8:
curl -XGET "https://xxx.europe-west2.gcp.elastic-cloud.com" -u user -v -H 'Accept: application/json;charset=utf-8'
We get in the response: < content-type: application/json;charset=utf-8
curl -XGET "https://xxx.europe-west2.gcp.elastic-cloud.com" -u user -v
We get in the response: < content-type: application/json
version 7:
curl -XGET "https://xxx.europe-west2.gcp.elastic-cloud.com" -u user -v
We get in the response: < content-type: application/json; charset=UTF-8
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered:
Elasticsearch Version
8.0+
Installed Plugins
No response
Java Version
bundled
OS Version
N/A
Problem Description
Some applications like PowerShell's Invoke-RestMethod count on charset information to display data correctly. An undocumented breaking change in 8.0 may cause applications to show non-ASCII characters incorrectly:
From version 8.0.0, Elasticsearch does not send the
Content-Type
response header asapplication/json;charset=utf-8
but simplyapplication/json
. According to RFC 8259, sending the charset information is not required when transferring JSON data, as UTF is the default encoding.The workaround is for clients to include
Accept: application/json; charset=UTF-8
header in requests.We believe this came as a side effect of content-type parsing refactoring needed for the REST API compatibility added in 8.0 (#61427).
This is a request to confirm the above finding and add the change to our breaking changes documentation. Thx!
Steps to Reproduce
version 8:
We get in the response: < content-type: application/json;charset=utf-8
We get in the response: < content-type: application/json
version 7:
We get in the response: < content-type: application/json; charset=UTF-8
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: