Skip to content

Commit b356b91

Browse files
chore: Removed unnecessary check for gzip in download
1 parent f70c048 commit b356b91

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import io.ionic.libs.ionfiletransferlib.helpers.assertSuccessHttpResponse
99
import io.ionic.libs.ionfiletransferlib.helpers.runCatchingIONFLTRExceptions
1010
import io.ionic.libs.ionfiletransferlib.helpers.use
1111
import io.ionic.libs.ionfiletransferlib.model.IONFLTRDownloadOptions
12-
import io.ionic.libs.ionfiletransferlib.model.IONFLTRException
1312
import io.ionic.libs.ionfiletransferlib.model.IONFLTRProgressStatus
1413
import io.ionic.libs.ionfiletransferlib.model.IONFLTRTransferComplete
1514
import io.ionic.libs.ionfiletransferlib.model.IONFLTRTransferResult
@@ -186,9 +185,7 @@ class IONFLTRController internal constructor(
186185
BufferedOutputStream(fileOut).use { outputStream ->
187186
val buffer = ByteArray(BUFFER_SIZE)
188187
var bytesRead: Int
189-
val lengthComputable = connection.contentEncoding.let {
190-
it == null || it.equals("gzip", ignoreCase = true)
191-
} && contentLength > 0
188+
val lengthComputable = contentLength > 0
192189
var totalBytesRead: Long = 0
193190

194191
while (inputStream.read(buffer).also { bytesRead = it } != -1) {

0 commit comments

Comments
 (0)