mirror of
https://github.com/androidx/media.git
synced 2025-05-08 08:00:49 +08:00
Update DefaultHttpDataSource.java
This commit is contained in:
parent
91a09ea320
commit
75b222d8d4
@ -369,8 +369,7 @@ 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…
x
Reference in New Issue
Block a user