Skip to content
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 for Empty Response Body and 0 Content Lenght #206

Merged
merged 6 commits into from
Jan 25, 2020

Conversation

cortinico
Copy link
Member

@cortinico cortinico commented Jan 24, 2020

Fixes a bug introduce by me in #198, when implementing clone of the okio.Buffer from the HTTP Response.

Looks like the problem on our end what that we were using ChuckerInterceptor as first interceptors, so the Sample App showed valid results. Switching order of the interceptors showed that responses are null and the approach followed for the .clone() was not correct. I reimplemented it following the HttpLoggingInterceptor body.

How to test

Remove the fix I applied on ChuckerInterceptor and keep only the changes I applied in the sample app. It should break and show null in the response body.

Fixes #203
Closes #205

I've rewrote the processResponseBody following the
body of HttpLoggingInterceptor.
@cortinico cortinico added the bug Something isn't working label Jan 24, 2020
@cortinico cortinico added this to the 3.1.1 milestone Jan 24, 2020
@cortinico cortinico requested a review from vbuberen January 24, 2020 23:51
@cortinico cortinico self-assigned this Jan 24, 2020
@vbuberen vbuberen mentioned this pull request Jan 25, 2020
Copy link
Collaborator

@vbuberen vbuberen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@vbuberen vbuberen merged commit d0cca85 into develop Jan 25, 2020
@vbuberen vbuberen deleted the fix-cortinico-response-body branch January 25, 2020 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 3.1.0 always claims that response body is empty
2 participants