diff options
author | Evgeni Golov <evgeni@golov.de> | 2013-05-31 18:21:31 +0200 |
---|---|---|
committer | Evgeni Golov <evgeni@golov.de> | 2013-09-30 07:56:54 +0200 |
commit | b6fc143074ae55bc6f9732d825571681f88f46ed (patch) | |
tree | f4ae61f5052df7e21047857c4d20f03b70195eb2 /lib/util.php | |
parent | 9ba0edcadb9aa55d44bbfc834f9b25c9f21a0c2e (diff) | |
download | nextcloud-server-b6fc143074ae55bc6f9732d825571681f88f46ed.tar.gz nextcloud-server-b6fc143074ae55bc6f9732d825571681f88f46ed.zip |
cURL does not honour default_socket_timeout
SabreDAV uses cURL for the requests and as this does not honour
default_socket_timeout, setting it is useless and confusing as
people will expect the request to timeout faster than it actually
will do.
One has to use
curl_setopt($curl, CURLOPT_TIMEOUT, x)
or
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, x)
but there is currently no way to make SabreDAV pass this to cURL.
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/util.php b/lib/util.php index 41f5f1d16be..d4f4eed1ca7 100755 --- a/lib/util.php +++ b/lib/util.php @@ -730,12 +730,6 @@ class OC_Util { 'baseUri' => OC_Helper::linkToRemote('webdav'), ); - // save the old timeout so that we can restore it later - $oldTimeout = 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); // for this self test we don't care if the ssl certificate is self signed and the peer cannot be verified. @@ -752,9 +746,6 @@ class OC_Util { $return = false; } - // restore the original timeout - ini_set("default_socket_timeout", $oldTimeout); - return $return; } |