This PR makes DownloadUtils add the Accept-Encoding header to requests, as otherwise, it is assumed we accept any compression strategy. The gzip and deflate strategies are now handled.
Additionally, when the content-length is -1 or there is a compression strategy in use, an exception will no longer be thrown if the bytes read vs expected don't match, as a discrepancy between the two will usually exist in that scenario.
This PR makes
DownloadUtils
add theAccept-Encoding
header to requests, as otherwise, it is assumed we accept any compression strategy. Thegzip
anddeflate
strategies are now handled. Additionally, when thecontent-length
is-1
or there is a compression strategy in use, an exception will no longer be thrown if the bytes read vs expected don't match, as a discrepancy between the two will usually exist in that scenario.