summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-09-23 16:55:16 +0200
committerVincent Petry <pvince81@owncloud.com>2014-09-23 16:55:16 +0200
commit89e02e89d4a0cf28a9318f4dacd070783cbb7531 (patch)
tree13d0e9000aad4f835c5b50484cd6101f4067db69 /lib
parent1e915cc14534d2fe68fdee05423fb82c035dd866 (diff)
parente65ceb08fc4a56d0fb9e4be5d51ba04168cbb59a (diff)
downloadnextcloud-server-89e02e89d4a0cf28a9318f4dacd070783cbb7531.tar.gz
nextcloud-server-89e02e89d4a0cf28a9318f4dacd070783cbb7531.zip
Merge pull request #7051 from owncloud/postsetupajaxcheck
Moved WebDAV check to client side JS
Diffstat (limited to 'lib')
-rwxr-xr-xlib/private/util.php47
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 5a310273258..e5137de0fad 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1036,53 +1036,6 @@ class OC_Util {
}
/**
- * test if webDAV is working properly
- *
- * @return bool
- * @description
- * The basic assumption is that if the server returns 401/Not Authenticated for an unauthenticated PROPFIND
- * the web server it self is setup properly.
- *
- * Why not an authenticated PROPFIND and other verbs?
- * - We don't have the password available
- * - We have no idea about other auth methods implemented (e.g. OAuth with Bearer header)
- *
- */
- public static function isWebDAVWorking() {
- if (!function_exists('curl_init')) {
- return true;
- }
- if (!\OC_Config::getValue("check_for_working_webdav", true)) {
- return true;
- }
- $settings = array(
- 'baseUri' => OC_Helper::linkToRemote('webdav'),
- );
-
- $client = new \OC_DAVClient($settings);
-
- $client->setRequestTimeout(10);
-
- // for this self test we don't care if the ssl certificate is self signed and the peer cannot be verified.
- $client->setVerifyPeer(false);
- // also don't care if the host can't be verified
- $client->setVerifyHost(0);
-
- $return = true;
- try {
- // test PROPFIND
- $client->propfind('', array('{DAV:}resourcetype'));
- } catch (\Sabre\DAV\Exception\NotAuthenticated $e) {
- $return = true;
- } catch (\Exception $e) {
- OC_Log::write('core', 'isWebDAVWorking: NO - Reason: ' . $e->getMessage() . ' (' . get_class($e) . ')', OC_Log::WARN);
- $return = false;
- }
-
- return $return;
- }
-
- /**
* Check if the setlocal call does not work. This can happen if the right
* local packages are not available on the server.
*