]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix ParseUrl: Only fetch a range to avoid memory issues
authorMichael <heluecht@pirati.ca>
Tue, 23 May 2017 05:26:22 +0000 (05:26 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 23 May 2017 05:26:22 +0000 (05:26 +0000)
src/ParseUrl.php

index e8b58806d987aa5d611f2aa78bbfd00efe0ded1e..9e21736a8465883f14961f6f17a52c5681117b5e 100644 (file)
@@ -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);