-
Notifications
You must be signed in to change notification settings - Fork 28
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 reading request body does not drain the input stream if stream is resettable #1537
Conversation
418176a
to
cabb0fd
Compare
a777477
to
67b084f
Compare
components/http/okHttp/src/main/java/com/microsoft/kiota/http/OkHttpRequestAdapter.java
Outdated
Show resolved
Hide resolved
for others who might be following along:
|
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
fd88bfa
to
6c2d170
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.
Thank you for making the changes!
A version bump, a changelog entry and we should be good to go!
components/http/okHttp/src/test/java/com/microsoft/kiota/http/OkHttpRequestAdapterTest.java
Outdated
Show resolved
Hide resolved
components/http/okHttp/src/test/java/com/microsoft/kiota/http/OkHttpRequestAdapterTest.java
Outdated
Show resolved
Hide resolved
Ah no release please yet :) |
fb23874
to
2c3191f
Compare
Quality Gate passedIssues Measures |
@Ndiritu the tag also needs to be manually created on this repo for the time being. I'll let you take care of that :) |
We currently override the Request body's
writeTo
method which was not resetting the input stream after the body is written e.g. by a logging interceptor. The network call would find an empty request body.This PR determines if the request body is resettable & configures
isOneShot()
to prevent non-resettable streams from being drained by logging middleware.closes microsoftgraph/msgraph-sdk-java#2037