-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Fix search scroll request with a plain text body #23183
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
@spalger fyi |
/cc @elastic/es-clients @jaymode would be good to have a rest test for this |
Thanks! |
@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 |
@jaymode you could add an integration test that sends a request using the low level REST client, rather than an ordinary yaml test. Extending |
@clintongormley did you want the rest test so it could be consumed by the clients? |
@jaymode yes - eg the perl client wouldn't have sent a plain text header in that case, and i think most clients won't. |
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.