From f5b310d044d88955efcc3e753ed8aeee0b386f7e Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Thu, 7 Jul 2016 00:31:19 +0200 Subject: [PATCH] =?UTF-8?q?-=20Error-Handler=20f=C3=BCr=20nicht-ladbare=20?= =?UTF-8?q?Dateien=20-=20gImages=20mit=20Timeout=20(funktioniert=20das=20s?= =?UTF-8?q?o=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/plugins/gImages.lua | 1 + otouto/utilities.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/otouto/plugins/gImages.lua b/otouto/plugins/gImages.lua index 661a9ec..1227e89 100644 --- a/otouto/plugins/gImages.lua +++ b/otouto/plugins/gImages.lua @@ -4,6 +4,7 @@ local gImages = {} local HTTPS = require('ssl.https') +HTTPS.timeout = 10 local URL = require('socket.url') local JSON = require('dkjson') local redis = (loadfile "./otouto/redis.lua")() diff --git a/otouto/utilities.lua b/otouto/utilities.lua index 27e7b6b..4d0b743 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -774,6 +774,7 @@ function get_last_modified_header(url) url = url, redirect = do_redir } + if not header then return end if header["last-modified"] then last_modified = header["last-modified"] elseif header["Last-Modified"] then