log download failure caused by missing content length
This commit is contained in:
parent
48a7818e88
commit
dcc13d7a3d
|
@ -216,7 +216,7 @@ public class HttpDownloadConnection implements Transferable {
|
||||||
String contentLength = connection.getHeaderField("Content-Length");
|
String contentLength = connection.getHeaderField("Content-Length");
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
if (contentLength == null) {
|
if (contentLength == null) {
|
||||||
throw new IOException();
|
throw new IOException("no content-length found in HEAD response");
|
||||||
}
|
}
|
||||||
return Long.parseLong(contentLength, 10);
|
return Long.parseLong(contentLength, 10);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue