From f70c048fe27299a1d1f79e4509d3182277cc503c Mon Sep 17 00:00:00 2001 From: Adrien Timmer Date: Tue, 21 Oct 2025 09:19:25 -0600 Subject: [PATCH 1/3] Removed explicit setting of `HttpURLConnection` `Accept-Encoding` header value as it disables automatic response decompression --- .../io/ionic/libs/ionfiletransferlib/IONFLTRController.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt b/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt index bd440f1..48419aa 100644 --- a/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt +++ b/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt @@ -285,9 +285,6 @@ class IONFLTRController internal constructor( } } - // gzip to allow for better progress tracking - connection.setRequestProperty("Accept-Encoding", "gzip") - if (useChunkedMode) { connection.setChunkedStreamingMode(BUFFER_SIZE) connection.setRequestProperty("Transfer-Encoding", "chunked") From b356b916a9c5f2720fa943d71427a77e4ff5e4ce Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 22 Dec 2025 13:22:15 +0000 Subject: [PATCH 2/3] chore: Removed unnecessary check for gzip in download --- .../io/ionic/libs/ionfiletransferlib/IONFLTRController.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt b/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt index 48419aa..961ad72 100644 --- a/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt +++ b/src/main/kotlin/io/ionic/libs/ionfiletransferlib/IONFLTRController.kt @@ -9,7 +9,6 @@ import io.ionic.libs.ionfiletransferlib.helpers.assertSuccessHttpResponse import io.ionic.libs.ionfiletransferlib.helpers.runCatchingIONFLTRExceptions import io.ionic.libs.ionfiletransferlib.helpers.use import io.ionic.libs.ionfiletransferlib.model.IONFLTRDownloadOptions -import io.ionic.libs.ionfiletransferlib.model.IONFLTRException import io.ionic.libs.ionfiletransferlib.model.IONFLTRProgressStatus import io.ionic.libs.ionfiletransferlib.model.IONFLTRTransferComplete import io.ionic.libs.ionfiletransferlib.model.IONFLTRTransferResult @@ -186,9 +185,7 @@ class IONFLTRController internal constructor( BufferedOutputStream(fileOut).use { outputStream -> val buffer = ByteArray(BUFFER_SIZE) var bytesRead: Int - val lengthComputable = connection.contentEncoding.let { - it == null || it.equals("gzip", ignoreCase = true) - } && contentLength > 0 + val lengthComputable = contentLength > 0 var totalBytesRead: Long = 0 while (inputStream.read(buffer).also { bytesRead = it } != -1) { From 701cfabbf14f85cedd3a414f7f9c7715e2b57550 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 22 Dec 2025 13:34:28 +0000 Subject: [PATCH 3/3] chore(release): Prepare for version 1.0.2 --- CHANGELOG.md | 6 ++++++ pom.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f585053..75ebec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.0.2 + +### 2025-12-22 + +- Fix processing of HTTP responses by removing unnecessary gzip header. + ## 1.0.1 ### 2025-08-01 diff --git a/pom.xml b/pom.xml index bfd31b4..9d46eb2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,5 +6,5 @@ 4.0.0 io.ionic.libs ionfiletransfer-android - 1.0.1 + 1.0.2 \ No newline at end of file