Skip to content

Commit b954a31

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 15edc87 + 31049cf commit b954a31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/src/main/java/com/loopj/android/http/DataAsyncHttpResponseHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ byte[] getResponseData(HttpEntity entity) throws IOException {
100100
ByteArrayBuffer buffer = new ByteArrayBuffer((int) contentLength);
101101
try {
102102
byte[] tmp = new byte[BUFFER_SIZE];
103-
int l;
103+
int l, count = 0;
104104
// do not send messages if request has been cancelled
105105
while ((l = instream.read(tmp)) != -1 && !Thread.currentThread().isInterrupted()) {
106106
buffer.append(tmp, 0, l);
107107
sendProgressDataMessage(copyOfRange(tmp, 0, l));
108+
sendProgressMessage(count, (int) contentLength);
108109
}
109110
} finally {
110111
AsyncHttpClient.silentCloseInputStream(instream);

0 commit comments

Comments
 (0)