From 35e66caab568667e83c6beb657a3941b8fb36c92 Mon Sep 17 00:00:00 2001 From: laoyuyu <511455842@qq.com> Date: Wed, 9 Dec 2020 20:30:10 +0800 Subject: [PATCH] fix bug https://github.com/AriaLyy/Aria/issues/811 --- .github/ISSUE_TEMPLATE/Custom.md | 2 ++ DEV_LOG.md | 1 + .../com/arialyy/aria/http/upload/HttpUThreadTaskAdapter.java | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Custom.md b/.github/ISSUE_TEMPLATE/Custom.md index e25f53bc..31d27a81 100644 --- a/.github/ISSUE_TEMPLATE/Custom.md +++ b/.github/ISSUE_TEMPLATE/Custom.md @@ -11,6 +11,8 @@ about: 提交问题前,请先阅读文档和搜索issue * 系统版本 +## 错误的url + ## 错误日志 diff --git a/DEV_LOG.md b/DEV_LOG.md index 048e6c28..57da165c 100644 --- a/DEV_LOG.md +++ b/DEV_LOG.md @@ -3,6 +3,7 @@ - 修复单线程下载时,文件已经完成,重复下载回调下载失败的问题 - 修复一个重新下载文件时,同名路径文件没有被被删除的问题 - fix bug https://github.com/AriaLyy/Aria/issues/807 + - fix bug https://github.com/AriaLyy/Aria/issues/811 + v_3.8.15 (2020/11/9) - 修复不支持断点的连接下载失败问题,https://github.com/AriaLyy/Aria/issues/771 - 修复iv不存在时,索引文件异常的问题,https://github.com/AriaLyy/Aria/issues/780 diff --git a/HttpComponent/src/main/java/com/arialyy/aria/http/upload/HttpUThreadTaskAdapter.java b/HttpComponent/src/main/java/com/arialyy/aria/http/upload/HttpUThreadTaskAdapter.java index bb0605d9..9d88d085 100644 --- a/HttpComponent/src/main/java/com/arialyy/aria/http/upload/HttpUThreadTaskAdapter.java +++ b/HttpComponent/src/main/java/com/arialyy/aria/http/upload/HttpUThreadTaskAdapter.java @@ -102,7 +102,7 @@ final class HttpUThreadTaskAdapter extends BaseHttpThreadTaskAdapter { } uploadFile(writer, mTaskOption.getAttachment(), uploadFile); - getEntity().setResponseStr(finish(writer)); + finish(writer); } catch (Exception e) { e.printStackTrace(); fail(new AriaHTTPException( @@ -214,10 +214,12 @@ final class HttpUThreadTaskAdapter extends BaseHttpThreadTaskAdapter { } reader.close(); mHttpConn.disconnect(); + getEntity().setResponseStr(response.toString()); complete(); } else { String msg = "response msg: " + mHttpConn.getResponseMessage() + ",code: " + status; ALog.e(TAG, msg); + getEntity().setResponseStr(response.toString()); fail(new AriaHTTPException(msg), false); response.append(status); }