WEB-26787 Can't download d.ts file for paper

This commit is contained in:
Sergey Simonchik
2017-05-08 23:17:04 +03:00
parent ee0e90d92c
commit fd68940dd7
@@ -205,6 +205,14 @@ public class NetUtils {
}
}
}
if (gzipStream != null) {
// Amount of read bytes may have changed when 'inputStream.read(buffer)' returns -1
// E.g. reading GZIP trailer doesn't produce inflated stream data.
bytesRead = gzipStream.getCompressedBytesRead();
if (indicator != null && expectedContentLength > 0) {
indicator.setFraction((double)bytesRead / expectedContentLength);
}
}
if (indicator != null) {
indicator.checkCanceled();