Merge pull request #4156 from ValveSoftware/dev-v2

OkHttp extension - response headers instead of request in InvalidResponseCodeException
This commit is contained in:
ojw28 2018-05-09 13:11:22 -07:00 committed by GitHub
commit a962f2d4d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);