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

Ensure we try to autodetect content type for handlers that support plain text #23452

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

jaymode
Copy link
Member

@jaymode jaymode commented Mar 2, 2017

For rest handlers that support plain text, we did not always try to auto detect the content type and instead just sent the request along. This breaks sending of JSON or other XContent requests without a content type header as the body will be parsed as plain text. This commit ensures we auto detect for these requests if auto detection is enabled.

…ain text

For rest handlers that support plain text, we did not always try to auto detect the content type and instead just sent
the request along. This breaks sending of JSON or other XContent requests without a content type header as the body
will be parsed as plain text. This commit ensures we auto detect for these requests if auto detection is enabled.
@jaymode jaymode requested a review from javanna March 2, 2017 12:47
Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jaymode jaymode merged commit fd896ac into elastic:5.3 Mar 2, 2017
jaymode added a commit that referenced this pull request Mar 2, 2017
…ain text (#23452)

For rest handlers that support plain text, we did not always try to auto detect the content type and instead just sent
the request along. This breaks sending of JSON or other XContent requests without a content type header as the body
will be parsed as plain text. This commit ensures we auto detect for these requests if auto detection is enabled.
@jaymode jaymode deleted the plain_text_autodetect branch March 2, 2017 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/REST API REST infrastructure and utilities v5.3.0 v5.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants