]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #1020 from ArthurHoaro/feature/curl-chunk
authorArthurHoaro <arthur@hoa.ro>
Sun, 26 Nov 2017 10:34:44 +0000 (11:34 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Nov 2017 10:34:44 +0000 (11:34 +0100)
Increase buffer size for cURL download

application/HttpUtils.php

index 0083596643f510d4ea131fad9df25de215ff77ac..ec54dcd4faa78a92bd3fb6533b7c4f9a6b608776 100644 (file)
@@ -76,7 +76,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304)
     curl_setopt($ch, CURLOPT_USERAGENT,         $userAgent);
 
     // Max download size management
-    curl_setopt($ch, CURLOPT_BUFFERSIZE,        1024);
+    curl_setopt($ch, CURLOPT_BUFFERSIZE,        1024*16);
     curl_setopt($ch, CURLOPT_NOPROGRESS,        false);
     curl_setopt($ch, CURLOPT_PROGRESSFUNCTION,
         function($arg0, $arg1, $arg2, $arg3, $arg4 = 0) use ($maxBytes)