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 authored Feb 23, 2024
1 parent e0c6202 commit cca3c80
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,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 cca3c80

Please sign in to comment.