mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +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.
|
||||
if (responseCode < 200 || responseCode > 299) {
|
||||
Map<String, List<String>> headers = connection.getHeaderFields();
|
||||
if (responseCode < 200 || responseCode > 299) {
|
||||
@Nullable InputStream errorStream = connection.getErrorStream();
|
||||
byte[] errorResponseBody;
|
||||
try {
|
||||
@ -379,6 +378,7 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
||||
} catch (IOException e) {
|
||||
errorResponseBody = Util.EMPTY_BYTE_ARRAY;
|
||||
}
|
||||
Map<String, List<String>> headers = connection.getHeaderFields();
|
||||
closeConnectionQuietly();
|
||||
InvalidResponseCodeException exception =
|
||||
new InvalidResponseCodeException(
|
||||
|
Loading…
x
Reference in New Issue
Block a user