-
Notifications
You must be signed in to change notification settings - Fork 191
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 error deserialization with AwsSdk2Transport (#1068) #1072
Fix error deserialization with AwsSdk2Transport (#1068) #1072
Conversation
770c8f6
to
55ec878
Compare
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.
55ec878
to
6f2ec50
Compare
@@ -617,6 +633,22 @@ private static <T> Optional<T> or(Optional<T> opt, Supplier<? extends Optional<? | |||
} | |||
} | |||
|
|||
private static ByteArrayInputStream toByteArrayInputStream(InputStream is) throws IOException { |
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.
I'm not crazy about this solution, but it's effectively what ApacheHttpClient5Transport
is doing by using BufferedHttpEntity
.
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.
The changes all look reasonable to me and in-line with the HttpClient5 transport's behaviour
java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java
Outdated
Show resolved
Hide resolved
6f2ec50
to
787c0e5
Compare
java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Wesley Workman <[email protected]>
787c0e5
to
6096a7b
Compare
Signed-off-by: Wesley Workman <[email protected]> (cherry picked from commit 5ec233d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 5ec233d) Signed-off-by: Wesley Workman <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This adds a failing test forFix for #1068