mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Update DefaultHttpDataSource.java
This commit is contained in:
parent
91a09ea320
commit
75b222d8d4
1 changed files with 2 additions and 2 deletions
|
|
@ -370,7 +370,6 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
||||||
|
|
||||||
// Check for a valid response code.
|
// Check for a valid response code.
|
||||||
if (responseCode < 200 || responseCode > 299) {
|
if (responseCode < 200 || responseCode > 299) {
|
||||||
Map<String, List<String>> headers = connection.getHeaderFields();
|
|
||||||
@Nullable InputStream errorStream = connection.getErrorStream();
|
@Nullable InputStream errorStream = connection.getErrorStream();
|
||||||
byte[] errorResponseBody;
|
byte[] errorResponseBody;
|
||||||
try {
|
try {
|
||||||
|
|
@ -379,6 +378,7 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
errorResponseBody = Util.EMPTY_BYTE_ARRAY;
|
errorResponseBody = Util.EMPTY_BYTE_ARRAY;
|
||||||
}
|
}
|
||||||
|
Map<String, List<String>> headers = connection.getHeaderFields();
|
||||||
closeConnectionQuietly();
|
closeConnectionQuietly();
|
||||||
InvalidResponseCodeException exception =
|
InvalidResponseCodeException exception =
|
||||||
new InvalidResponseCodeException(
|
new InvalidResponseCodeException(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue