Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit a83c31b5 authored by Iskra Delta's avatar Iskra Delta Committed by AndyScherzinger
Browse files

Set correct content-length for last chunk

parent 3a81bd5b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class ChunkFromFileChannelRequestEntity implements RequestEntity, Progres
    
    public long getContentLength() {
        try {
            return Math.min(mChunkSize, mChannel.size() - mChannel.position());
            return Math.min(mChunkSize, mChannel.size() - mOffset);
        } catch (IOException e) {
            return mChunkSize;
        }