Skip to content

Commit a2540c2

Browse files
committed
1 parent 4737240 commit a2540c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HMCLCore/src/main/java/org/jackhuang/hmcl/util/io/NetworkUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public static String readData(HttpURLConnection con) throws IOException {
178178
public static String detectFileName(URL url) throws IOException {
179179
HttpURLConnection conn = resolveConnection(createConnection(url));
180180
int code = conn.getResponseCode();
181-
if (code == 404)
181+
if (code / 100 == 4)
182182
throw new FileNotFoundException();
183183
if (code / 100 != 2)
184184
throw new IOException(url + ": response code " + conn.getResponseCode());

0 commit comments

Comments
 (0)