From 4ff3ed1c47365d5b28f70cb2921b0ac0075612c3 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 28 Feb 2018 22:29:43 +0100 Subject: Make max download size and timeout configurable Fixes #1061 --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index bd34c0cd..f7722433 100644 --- a/index.php +++ b/index.php @@ -1376,7 +1376,12 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { // Short timeout to keep the application responsive // The callback will fill $charset and $title with data from the downloaded page. - get_http_response($url, 25, 4194304, get_curl_download_callback($charset, $title)); + get_http_response( + $url, + $conf->get('general.download_max_size', 4194304), + $conf->get('general.download_timeout', 30), + get_curl_download_callback($charset, $title) + ); if (! empty($title) && strtolower($charset) != 'utf-8') { $title = mb_convert_encoding($title, 'utf-8', $charset); } -- cgit v1.2.3