log download failure caused by missing content length

This commit is contained in:
Daniel Gultsch 2016-06-16 20:36:51 +02:00
parent 48a7818e88
commit dcc13d7a3d
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ public class HttpDownloadConnection implements Transferable {
String contentLength = connection.getHeaderField("Content-Length");
connection.disconnect();
if (contentLength == null) {
throw new IOException();
throw new IOException("no content-length found in HEAD response");
}
return Long.parseLong(contentLength, 10);
} catch (IOException e) {