Check completed download size against Content-Length header.
If the number of bytes received is less than the reported content length (e.g. a network timeout), mark the download with the "error" status instead of "complete". Content-Length should be reliable if reported at all, so this should be a valid approach. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -174,9 +174,7 @@ public class MengSkyServer extends DownloadServer {
|
||||
continue;
|
||||
}
|
||||
|
||||
DownloadNode node = new DownloadNode(id, date, title, titleUnicode, artist, artistUnicode, creator);
|
||||
System.out.println(node);
|
||||
nodeList.add(node);
|
||||
nodeList.add(new DownloadNode(id, date, title, titleUnicode, artist, artistUnicode, creator));
|
||||
}
|
||||
|
||||
nodes = nodeList.toArray(new DownloadNode[nodeList.size()]);
|
||||
|
||||
Reference in New Issue
Block a user