From dcc13d7a3d991132b8cb3e88eb08db61c161c510 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 16 Jun 2016 20:36:51 +0200 Subject: [PATCH] log download failure caused by missing content length --- .../eu/siacs/conversations/http/HttpDownloadConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index b8dbdb57b..f00a6cc5f 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -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) {