-
Notifications
You must be signed in to change notification settings - Fork 484
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
Incorrect input stream reading when retrying request #924
Comments
@zoltan-mihalyi Could you paste your client code causing the failure? If you use |
@balamurugana I updated the issue description to include my code. I tried with a custom OkHttpClient instance, using retryOnConnectionFailure(false) which works as expected: However, there are other cases when This is why okhttp does not have a default InputStream-based RequestBody. square/okhttp#2424 |
@zoltan-mihalyi I don't see your code in the description. This is the reason |
@balamurugana sorry for that, forget to save.
|
When okhttp retries a failed request, minio keeps reading from the half-consumed InputStream, which causes the second request to be different (or EOFException is thrown).
Expected Behavior
The second request should be the same as the first
Current Behavior
The second request body contains incorrect data/fails with EOFException
Possible Solution
writeTo
call.Steps to Reproduce (for bugs)
My test code:
if the InputStream was smaller than the part size:
if the InputStream was biggerr than the part size:
Your Environment
7.0.2
minio/minio:RELEASE.2020-05-06T23-23-25Z
The text was updated successfully, but these errors were encountered: