Fix search scroll request with a plain text body#23183
Merged
jaymode merged 2 commits intoelastic:5.xfrom Feb 15, 2017
Merged
Conversation
The backport of elastic#22691 caused plain text bodies with a scroll id to fail with an IllegalStateException as the wrong method was being called. This commit adds tests to ensure plain text bodies work and fixes the search scroll action so that it properly handles a request with a plain text body.
jaymode
added a commit
that referenced
this pull request
Feb 15, 2017
The backport of #22691 caused plain text bodies with a scroll id to fail with an IllegalStateException as the wrong method was being called. This commit adds tests to ensure plain text bodies work and fixes the search scroll action so that it properly handles a request with a plain text body.
Member
Author
|
@spalger fyi |
Contributor
|
/cc @elastic/es-clients @jaymode would be good to have a rest test for this |
Contributor
|
Thanks! |
Member
Author
|
@clintongormley unfortunately the rest test framework does not support plain text bodies. It expects to be able to parse the body into a map which it cannot really do here, so I think adding a rest test is more trouble than it is worth |
Contributor
|
@jaymode you could add an integration test that sends a request using the low level REST client, rather than an ordinary yaml test. Extending |
Member
Author
|
@clintongormley did you want the rest test so it could be consumed by the clients? |
Contributor
|
@jaymode yes - eg the perl client wouldn't have sent a plain text header in that case, and i think most clients won't. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backport of #22691 caused plain text bodies with a scroll id to fail with an IllegalStateException as the wrong method was being called. This commit adds tests to ensure plain text bodies work and fixes the search scroll action so that it properly handles a request with a plain text body.