Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ private AutoUpdateStatus downloadFile(
logger.debug("HTTP Status is OK");
// wrap input stream in a buffered stream
InputStream is = new BufferedInputStream(connection.getInputStream());
// decompress, if necessary
if (dataFile.getConfiguration().getDecompressContent()) {
is = new GZIPInputStream(is);
}
// if checking md5 wrap in a DigestStream
MessageDigest md = null;
if (dataFile.getConfiguration().getVerifyMd5()) {
Expand All @@ -635,10 +639,6 @@ private AutoUpdateStatus downloadFile(
}
is = new DigestInputStream(is, md);
}
// decompress, if necessary
if (dataFile.getConfiguration().getDecompressContent()) {
is = new GZIPInputStream(is);
}
// copy resulting stream to destination
if (Objects.nonNull(tempFile.getPath())) {
logger.debug("Copying download stream");
Expand Down
Loading