Skip to content

Commit

Permalink
Merge pull request #16269 from owncloud/master-fix-16179
Browse files Browse the repository at this point in the history
Check if cURL supports the desired features
  • Loading branch information
MorrisJobke committed May 12, 2015
2 parents d4eff55 + 4613456 commit dc36282
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/private/files/storage/dav.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,12 @@ public function fopen($path, $mode) {
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);
Expand Down

0 comments on commit dc36282

Please sign in to comment.