|
|
@ -102,7 +102,7 @@ final class HttpUThreadTaskAdapter extends BaseHttpThreadTaskAdapter { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uploadFile(writer, mTaskOption.getAttachment(), uploadFile); |
|
|
|
uploadFile(writer, mTaskOption.getAttachment(), uploadFile); |
|
|
|
getEntity().setResponseStr(finish(writer)); |
|
|
|
finish(writer); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
fail(new AriaHTTPException( |
|
|
|
fail(new AriaHTTPException( |
|
|
@ -214,10 +214,12 @@ final class HttpUThreadTaskAdapter extends BaseHttpThreadTaskAdapter { |
|
|
|
} |
|
|
|
} |
|
|
|
reader.close(); |
|
|
|
reader.close(); |
|
|
|
mHttpConn.disconnect(); |
|
|
|
mHttpConn.disconnect(); |
|
|
|
|
|
|
|
getEntity().setResponseStr(response.toString()); |
|
|
|
complete(); |
|
|
|
complete(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
String msg = "response msg: " + mHttpConn.getResponseMessage() + ",code: " + status; |
|
|
|
String msg = "response msg: " + mHttpConn.getResponseMessage() + ",code: " + status; |
|
|
|
ALog.e(TAG, msg); |
|
|
|
ALog.e(TAG, msg); |
|
|
|
|
|
|
|
getEntity().setResponseStr(response.toString()); |
|
|
|
fail(new AriaHTTPException(msg), false); |
|
|
|
fail(new AriaHTTPException(msg), false); |
|
|
|
response.append(status); |
|
|
|
response.append(status); |
|
|
|
} |
|
|
|
} |
|
|
|