Skip to content

Commit

Permalink
fix(android): handle http errors on the proxy (#7280)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Feb 28, 2024
1 parent 30eb6f7 commit 1804396
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,10 @@ private WebResourceResponse handleCapacitorHttpRequest(WebResourceRequest reques
}
}

InputStream inputStream = connection.getInputStream();
InputStream inputStream = connection.getErrorStream();
if (inputStream == null) {
inputStream = connection.getInputStream();
}

if (null == mimeType) {
mimeType = getMimeType(request.getUrl().getPath(), inputStream);
Expand Down

0 comments on commit 1804396

Please sign in to comment.