Skip to content

Respect custom content-type header in the reactive client. #2088

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

Closed
sothawo opened this issue Feb 16, 2022 · 0 comments · Fixed by #2093
Closed

Respect custom content-type header in the reactive client. #2088

sothawo opened this issue Feb 16, 2022 · 0 comments · Fixed by #2093
Assignees
Labels
type: bug A general bug

Comments

@sothawo
Copy link
Collaborator

sothawo commented Feb 16, 2022

In order to be able to use the current reactive client against a version 8 cluster, it is necessary to set the following headers:

"Accept: application/vnd.elasticsearch+json;compatible-with=7"
"Content-Type: application/vnd.elasticsearch+json;compatible-with=7"

When doing this by configuring the client, the current code in addition adds the

"Content-Type: application/json"

header which leads to an error returned from Elasticsearch.

A content-type header determined by the content should only be added when no header was set by the user.

@sothawo sothawo added the type: bug A general bug label Feb 16, 2022
@sothawo sothawo self-assigned this Feb 17, 2022
sothawo added a commit that referenced this issue Feb 18, 2022
sothawo added a commit that referenced this issue Feb 18, 2022
Original Pull Request #2093
Closes #2088

(cherry picked from commit cf380e2)
sothawo added a commit that referenced this issue Feb 18, 2022
Original Pull Request #2093
Closes #2088

(cherry picked from commit cf380e2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant