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 3957bce commit 1278340Copy full SHA for 1278340
src/main/java/airsquared/blobsaver/app/Network.java
@@ -174,7 +174,7 @@ private void ensureOpen() throws IOException {
174
if (pos > 0)
175
connection.addRequestProperty("Range", "bytes=" + pos + "-");
176
ch = Channels.newChannel(connection.getInputStream());
177
- if (connection instanceof HttpURLConnection c && c.getResponseCode() != 200) {
+ if (connection instanceof HttpURLConnection c && (c.getResponseCode() < 200 || c.getResponseCode() > 299)) {
178
throw new IOException("HTTP Response was " + c.getResponseCode() + " " + Utils.defIfNull(c.getResponseMessage(), ""));
179
}
180
String resp = connection.getHeaderField("Content-Range");
0 commit comments