fix(android): HEAD request should return statusCode (#132)

This commit is contained in:
Manol Donev
2018-07-30 17:19:26 +03:00
committed by GitHub
parent fad12eedc3
commit 32e59e47d6

View File

@@ -386,8 +386,6 @@ public class Async
public void readResponseStream(HttpURLConnection connection, Stack<Closeable> openedStreams, RequestOptions options) throws IOException
{
this.statusCode = connection.getResponseCode();
int contentLength = connection.getContentLength();
InputStream inStream;
@@ -564,6 +562,7 @@ public class Async
// build the result
result.getHeaders(connection);
result.url = options.url;
result.statusCode = connection.getResponseCode();
result.statusText = connection.getResponseMessage();
if (!requestMethod.equals(HEAD_METHOD))
{
@@ -613,4 +612,4 @@ public class Async
}
}
}
}
}