log download failure caused by missing content length

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | 2 
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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) {