|
|
@@ -556,11 +556,16 @@ class OC_Util { |
|
|
|
if (!function_exists('curl_init')) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
$settings = array( |
|
|
|
'baseUri' => OC_Helper::linkToRemote('webdav'), |
|
|
|
); |
|
|
|
|
|
|
|
// save the old timeout so that we can restore it later |
|
|
|
$old_timeout=ini_get("default_socket_timeout"); |
|
|
|
|
|
|
|
// use a 5 sec timeout for the check. Should be enough for local requests. |
|
|
|
ini_set("default_socket_timeout", 5); |
|
|
|
|
|
|
|
$client = new \Sabre_DAV_Client($settings); |
|
|
|
|
|
|
|
$return = true; |
|
|
@@ -574,6 +579,9 @@ class OC_Util { |
|
|
|
$return = false; |
|
|
|
} |
|
|
|
|
|
|
|
// restore the original timeout |
|
|
|
ini_set("default_socket_timeout", $old_timeout); |
|
|
|
|
|
|
|
return $return; |
|
|
|
} |
|
|
|
|