mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Update DefaultHttpDataSource.java
set responseBody to Util.EMPTY_BYTE_ARRAY when an IOException occurs trying to get his value from inputStream
This commit is contained in:
parent
ee0d4a5b3e
commit
654890846a
1 changed files with 1 additions and 2 deletions
|
|
@ -377,8 +377,7 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
||||||
errorResponseBody =
|
errorResponseBody =
|
||||||
errorStream != null ? Util.toByteArray(errorStream) : Util.EMPTY_BYTE_ARRAY;
|
errorStream != null ? Util.toByteArray(errorStream) : Util.EMPTY_BYTE_ARRAY;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new InvalidResponseCodeException(
|
errorResponseBody = Util.EMPTY_BYTE_ARRAY;
|
||||||
responseCode, responseMessage, headers, dataSpec, null);
|
|
||||||
}
|
}
|
||||||
closeConnectionQuietly();
|
closeConnectionQuietly();
|
||||||
InvalidResponseCodeException exception =
|
InvalidResponseCodeException exception =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue