Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.ionic.libs</groupId>
<artifactId>ionfiletransfer-android</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -285,9 +282,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")
Expand Down