summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-12 18:27:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-12 18:27:57 +0200
commitdc362823e0d30b80be1ead90ef6d4ddb76fd1929 (patch)
tree3d5719022ec4b9b4b832fc128cce67c0a9245403 /lib
parentd4eff55342500603584b6526fc239bc9bd66a4a5 (diff)
parent4613456a8ab2928954d7255b7e0df7387ab71c71 (diff)
downloadnextcloud-server-dc362823e0d30b80be1ead90ef6d4ddb76fd1929.tar.gz
nextcloud-server-dc362823e0d30b80be1ead90ef6d4ddb76fd1929.zip
Merge pull request #16269 from owncloud/master-fix-16179
Check if cURL supports the desired features
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/dav.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index 3d9d48c7763..0ddfde15047 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -346,8 +346,12 @@ class DAV extends Common {
curl_setopt($curl, CURLOPT_URL, $this->createBaseUri() . $this->encodePath($path));
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
- curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+ if(defined('CURLOPT_PROTOCOLS')) {
+ curl_setopt($curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+ }
+ if(defined('CURLOPT_REDIR_PROTOCOLS')) {
+ curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+ }
if ($this->secure === true) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);