From: Michael Date: Tue, 23 May 2017 05:26:22 +0000 (+0000) Subject: Bugfix ParseUrl: Only fetch a range to avoid memory issues X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c84a2fb1a32f5c95d3f46e765d7de4bca896bc0c;p=friendica.git Bugfix ParseUrl: Only fetch a range to avoid memory issues --- diff --git a/src/ParseUrl.php b/src/ParseUrl.php index e8b58806d9..9e21736a84 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -155,6 +155,12 @@ class ParseUrl { @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); } + $range = intval(Config::get('system', 'curl_range_bytes', 0)); + + if ($range > 0) { + curl_setopt($ch, CURLOPT_RANGE, '0-' . $range); + } + $header = curl_exec($ch); $curl_info = @curl_getinfo($ch); curl_close($ch);