From 680d28360c781ff29e810821801cfaba0493c526 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 29 Nov 2018 16:30:20 +0100 Subject: Check content_length for null before parsing in http HEAD message response fixes #468 --- plugins/http-files/src/file_provider.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/http-files/src') diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala index 3fa32097..82ccc710 100644 --- a/plugins/http-files/src/file_provider.vala +++ b/plugins/http-files/src/file_provider.vala @@ -89,7 +89,9 @@ public class FileProvider : Dino.FileProvider, Object { if (name == "Content-Length") content_length = val; }); file_transfer.mime_type = content_type; - file_transfer.size = int.parse(content_length); + if (content_length != null) { + file_transfer.size = int.parse(content_length); + } } } -- cgit v1.2.3-70-g09d2