Skip to content

Commit

Permalink
Merge pull request owncloud#15 from owncloud/sabredav-1.7.5-master
Browse files Browse the repository at this point in the history
update SabreDAV to 1.7.5
  • Loading branch information
Frank Karlitschek committed Mar 1, 2013
2 parents 70def5c + 9a45bef commit a528fe4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Sabre/CalDAV/Backend/SharingSupport.php
Expand Up @@ -39,8 +39,8 @@
* How it works
* ============
*
* When a user shares a calendar, the addShare() method will be called with a
* list of sharees that are now added, and a list of sharees that have been
* When a user shares a calendar, the updateShares() method will be called with
* a list of sharees that are now added, and a list of sharees that have been
* removed.
* Removal is instant, but when a sharee is added the sharee first gets a
* chance to accept or reject the invitation for a share.
Expand Down
2 changes: 1 addition & 1 deletion Sabre/CardDAV/Property/SupportedAddressData.php
Expand Up @@ -31,7 +31,7 @@ public function __construct(array $supportedData = null) {
if (is_null($supportedData)) {
$supportedData = array(
array('contentType' => 'text/vcard', 'version' => '3.0'),
array('contentType' => 'text/vcard', 'version' => '4.0'),
// array('contentType' => 'text/vcard', 'version' => '4.0'),
);
}

Expand Down
2 changes: 1 addition & 1 deletion Sabre/CardDAV/Version.php
Expand Up @@ -16,7 +16,7 @@ class Sabre_CardDAV_Version {
/**
* Full version number
*/
const VERSION = '1.7.4';
const VERSION = '1.7.5';

/**
* Stability : alpha, beta, stable
Expand Down
24 changes: 22 additions & 2 deletions Sabre/DAV/Client.php
Expand Up @@ -58,6 +58,13 @@ class Sabre_DAV_Client {
*/
protected $authType;

/**
* Indicates if SSL verification is enabled or not.
*
* @var boolean
*/
private $verifyPeer;

/**
* Constructor
*
Expand Down Expand Up @@ -103,7 +110,7 @@ public function __construct(array $settings) {
/**
* Add trusted root certificates to the webdav client.
*
* The parameter certificates should be a absulute path to a file
* The parameter certificates should be a absolute path to a file
* which contains all trusted certificates
*
* @param string $certificates
Expand All @@ -112,6 +119,15 @@ public function addTrustedCertificates($certificates) {
$this->trustedCertificates = $certificates;
}

/**
* Enables/disables SSL peer verification
*
* @param boolean $value
*/
public function setVerifyPeer($value) {
$this->verifyPeer = $value;
}

/**
* Does a PROPFIND request
*
Expand Down Expand Up @@ -304,14 +320,18 @@ public function request($method, $url = '', $body = null, $headers = array()) {
CURLOPT_MAXREDIRS => 5,
);

if($this->verifyPeer !== null) {
$curlSettings[CURLOPT_SSL_VERIFYPEER] = $this->verifyPeer;
}

if($this->trustedCertificates) {
$curlSettings[CURLOPT_CAINFO] = $this->trustedCertificates;
}

switch ($method) {
case 'HEAD' :

// do not read body with HEAD requests (this is neccessary because cURL does not ignore the body with HEAD
// do not read body with HEAD requests (this is necessary because cURL does not ignore the body with HEAD
// requests when the Content-Length header is given - which in turn is perfectly valid according to HTTP
// specs...) cURL does unfortunately return an error in this case ("transfer closed transfer closed with
// ... bytes remaining to read") this can be circumvented by explicitly telling cURL to ignore the
Expand Down
2 changes: 1 addition & 1 deletion Sabre/DAV/Version.php
Expand Up @@ -14,7 +14,7 @@ class Sabre_DAV_Version {
/**
* Full version number
*/
const VERSION = '1.7.4';
const VERSION = '1.7.5';

/**
* Stability : alpha, beta, stable
Expand Down

0 comments on commit a528fe4

Please sign in to comment.