Skip to content
Open
Changes from 1 commit
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 @@ -63,9 +63,11 @@ public boolean exists() {
httpCon.setRequestMethod("HEAD");
int code = httpCon.getResponseCode();
if (code == HttpURLConnection.HTTP_OK) {
httpCon.disconnect();
return true;
}
else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
httpCon.disconnect();
return false;
}
else if (code == HttpURLConnection.HTTP_BAD_METHOD) {
Expand All @@ -74,9 +76,11 @@ else if (code == HttpURLConnection.HTTP_BAD_METHOD) {
if (con instanceof HttpURLConnection newHttpCon) {
code = newHttpCon.getResponseCode();
if (code == HttpURLConnection.HTTP_OK) {
newHttpCon.disconnect();
return true;
}
else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
newHttpCon.disconnect();
return false;
}
httpCon = newHttpCon;
Expand Down