mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #16269 from owncloud/master-fix-16179
Check if cURL supports the desired features
This commit is contained in:
commit
dc362823e0
1 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue