-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
Chucker misses headers for compressed responses #474
Comments
I'm not sure I agree with that it is redacted data. It feels quite natural to me. If I'm interested in a I don't mind going either way but I wouldn't consider it a bug. |
Right, missed that. Actually, have never used as |
✍️ Describe the bug
When I tried to reproduce the #472 issue found out that check
isGzipped
inChuckerInterceptor
always returnsfalse
for responses in Chucker sample app for gzip request. As it turned out headers inResponse
object contained noContent-Encoding
header. After looking further I found out that OkHttp removesContent-Encoding
andContent-Length
headers from compressed responses. Due to this fact all responses were treated as non gzipped by Chucker and Chuck all this time.💣 Steps to reproduce
/gzip
transaction and see noContent-Encoding
andContent-Length
headers, while they should be there https://httpbin.org/#/Response_formats/get_gzip🔧 Expected behavior
I believe that Chucker should show raw data when it comes to headers, not some redacted version.
📷 Screenshots
📱 Tech info
📄 Additional context
To get so-called raw data from responses Chucker should use not
response
, butnetworkResponse
object https://square.github.io/okhttp/4.x/okhttp/okhttp3/-response/network-response/ , since such object contains all headers (see attached screenshot).This fix should not only go into
develop
branch for the future4.x
release, but also to3.x
branch for future3.3.1
release for users, who still need to support APIs down to 16.The text was updated successfully, but these errors were encountered: