mirror of
https://github.com/androidx/media.git
synced 2025-05-17 04:29:55 +08:00
OkHttp extension - properly use response headers instead of request headers when throwing InvalidResponseCodeException
This commit is contained in:
parent
d4eb2e5b85
commit
3f3191bb75
@ -170,7 +170,7 @@ public class OkHttpDataSource implements HttpDataSource {
|
||||
|
||||
// Check for a valid response code.
|
||||
if (!response.isSuccessful()) {
|
||||
Map<String, List<String>> headers = request.headers().toMultimap();
|
||||
Map<String, List<String>> headers = response.headers().toMultimap();
|
||||
closeConnectionQuietly();
|
||||
InvalidResponseCodeException exception = new InvalidResponseCodeException(
|
||||
responseCode, headers, dataSpec);
|
||||
|
Loading…
x
Reference in New Issue
Block a user