Allow default_socket_timeout to extend the curl timeout if it is longer than 300s, fixes #10018
parent
e07d2a7bef
commit
1f4401005c
|
@ -160,7 +160,7 @@ class CurlDownloader
|
|||
curl_setopt($curlHandle, CURLOPT_URL, $url);
|
||||
curl_setopt($curlHandle, CURLOPT_FOLLOWLOCATION, false);
|
||||
curl_setopt($curlHandle, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($curlHandle, CURLOPT_TIMEOUT, 300);
|
||||
curl_setopt($curlHandle, CURLOPT_TIMEOUT, max((int) ini_get("default_socket_timeout"), 300));
|
||||
curl_setopt($curlHandle, CURLOPT_WRITEHEADER, $headerHandle);
|
||||
curl_setopt($curlHandle, CURLOPT_FILE, $bodyHandle);
|
||||
curl_setopt($curlHandle, CURLOPT_ENCODING, "gzip");
|
||||
|
|
Loading…
Reference in New Issue