We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4737240 commit a2540c2Copy full SHA for a2540c2
HMCLCore/src/main/java/org/jackhuang/hmcl/util/io/NetworkUtils.java
@@ -178,7 +178,7 @@ public static String readData(HttpURLConnection con) throws IOException {
178
public static String detectFileName(URL url) throws IOException {
179
HttpURLConnection conn = resolveConnection(createConnection(url));
180
int code = conn.getResponseCode();
181
- if (code == 404)
+ if (code / 100 == 4)
182
throw new FileNotFoundException();
183
if (code / 100 != 2)
184
throw new IOException(url + ": response code " + conn.getResponseCode());
0 commit comments