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

[DOCS] Document Content-Type response header breaking change in 8.0 #114669

Closed
ppf2 opened this issue Oct 11, 2024 · 1 comment
Closed

[DOCS] Document Content-Type response header breaking change in 8.0 #114669

ppf2 opened this issue Oct 11, 2024 · 1 comment
Assignees
Labels
>docs General docs changes Team:Docs Meta label for docs team

Comments

@ppf2
Copy link
Member

ppf2 commented Oct 11, 2024

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 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

@ppf2 ppf2 added >docs General docs changes needs:triage Requires assignment of a team area label Team:Docs Meta label for docs team labels Oct 11, 2024
@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Oct 11, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes Team:Docs Meta label for docs team
Projects
None yet
Development

No branches or pull requests

3 participants