You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (bytesRemainingInChunk == 0 && in.available() >= MIN_LAST_CHUNK_LENGTH) {
Using available() on an InputStream is generally a bad idea, I guess. In many cases this will return 0.
In case of a server returning gzipped data (content-encoding: gzip) of more than a few KB, it will probably turn on chunked encoding (transfer-encoding: chunked). Most probably to support non-buffered streaming mode.
In this case the ChunkedInputStream will never commit the response data to the cache.
The easy fix is probably to reduce the if statement in line 68 to: