Skip to content

[4.x] Prefer config supplied content-type and accept header in reactive client. #2327

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 Oct 8, 2022 · 1 comment · Fixed by #2328
Closed

[4.x] Prefer config supplied content-type and accept header in reactive client. #2327

sothawo opened this issue Oct 8, 2022 · 1 comment · Fixed by #2328
Assignees
Labels
type: bug A general bug

Comments

@sothawo
Copy link
Collaborator

sothawo commented Oct 8, 2022

When using Versions 4.x to access Elasticsearch (not officially supported) it is necessary to set compatibility headers; we have this documented. But in addition to the headers defined in the client configuration, the reactive client sets a content-type: application/json on request with a body. This lead to two headers being sent and Elasticsearch rejects this.

So the config defined headers must have higher priority and overwrite an automatically set header.

@sothawo sothawo added the type: bug A general bug label Oct 8, 2022
@sothawo sothawo self-assigned this Oct 8, 2022
sothawo added a commit that referenced this issue Oct 8, 2022
@sothawo sothawo linked a pull request Oct 8, 2022 that will close this issue
@sothawo
Copy link
Collaborator Author

sothawo commented Oct 8, 2022

Should have been automatically closed by #2328

@sothawo sothawo closed this as completed Oct 8, 2022
@sothawo sothawo added this to the 4.4.4 (2021.2.4) milestone Oct 8, 2022
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