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

Commit 58ab5215 authored by Andy Scherzinger's avatar Andy Scherzinger Committed by GitHub
Browse files

Merge pull request #22 from iskradelta/master

Set correct content-length for last chunk (targeting master)
parents e0e989ef 9d214033
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;
        }
+3 −2
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;


@@ -43,7 +44,7 @@ public class Log_OC {
    }
    public static void d(String TAG, String message, Exception e) {
        Log.d(TAG, message, e);
        appendLog(TAG + " : " + message + " Exception : "+ e.getStackTrace());
        appendLog(TAG + " : " + message + " Exception : "+ Arrays.toString(e.getStackTrace()));
    }
    public static void e(String TAG, String message){
        Log.e(TAG, message);
@@ -52,7 +53,7 @@ public class Log_OC {
    
    public static void e(String TAG, String message, Throwable e) {
        Log.e(TAG, message, e);
        appendLog(TAG+" : " + message +" Exception : " + e.getStackTrace());
        appendLog(TAG+" : " + message +" Exception : " + Arrays.toString(e.getStackTrace()));
    }
    
    public static void v(String TAG, String message){