mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
OkHttp extension - properly use response headers instead of request headers when throwing InvalidResponseCodeException
This commit is contained in:
parent
d4eb2e5b85
commit
3f3191bb75
1 changed files with 1 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ public class OkHttpDataSource implements HttpDataSource {
|
||||||
|
|
||||||
// Check for a valid response code.
|
// Check for a valid response code.
|
||||||
if (!response.isSuccessful()) {
|
if (!response.isSuccessful()) {
|
||||||
Map<String, List<String>> headers = request.headers().toMultimap();
|
Map<String, List<String>> headers = response.headers().toMultimap();
|
||||||
closeConnectionQuietly();
|
closeConnectionQuietly();
|
||||||
InvalidResponseCodeException exception = new InvalidResponseCodeException(
|
InvalidResponseCodeException exception = new InvalidResponseCodeException(
|
||||||
responseCode, headers, dataSpec);
|
responseCode, headers, dataSpec);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue