Commit a962f2d4 by ojw28 Committed by GitHub

Merge pull request #4156 from ValveSoftware/dev-v2

OkHttp extension - response headers instead of request in InvalidResponseCodeException
parents d9d13630 d709df8e
...@@ -170,7 +170,7 @@ public class OkHttpDataSource implements HttpDataSource { ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment