Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private static WebResourceResponse createWebResourceResponse(String mimeType, St
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
int finalStatusCode = statusCode;
try {
if (data.available() == 0) {
if (data.available() == -1) {
finalStatusCode = 404;
}
} catch (IOException e) {
Expand Down Expand Up @@ -595,7 +595,7 @@ private InputStream getInputStream() {
@Override
public int available() throws IOException {
InputStream is = getInputStream();
return (is != null) ? is.available() : 0;
return (is != null) ? is.available() : -1;
}

@Override
Expand Down