[Pkg-owncloud-commits] [php-sabredav] 42/66: Few more tweaks to make sabre/dav work with sabre/http alpha6
David Prévot
taffit at moszumanska.debian.org
Sat Jan 18 20:08:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit bf8349e8da5aaefd18a7a0f338539b1b8e49441f
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Fri Jan 3 22:59:11 2014 +0100
Few more tweaks to make sabre/dav work with sabre/http alpha6
---
composer.json | 2 +-
lib/Sabre/CalDAV/Plugin.php | 2 +-
lib/Sabre/DAV/Client.php | 2 +-
lib/Sabre/DAV/PartialUpdate/Plugin.php | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/composer.json b/composer.json
index 6600edd..02da8af 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
"php": ">=5.4.1",
"sabre/vobject" : "~3.1.0",
"sabre/event" : "~1.0.0",
- "sabre/http" : "dev-master",
+ "sabre/http" : "~2.0.0alpha6",
"ext-dom": "*",
"ext-pcre": "*",
"ext-spl": "*",
diff --git a/lib/Sabre/CalDAV/Plugin.php b/lib/Sabre/CalDAV/Plugin.php
index 4fca25d..5f9e9e6 100644
--- a/lib/Sabre/CalDAV/Plugin.php
+++ b/lib/Sabre/CalDAV/Plugin.php
@@ -970,7 +970,7 @@ class Plugin extends DAV\ServerPlugin {
// Parsing the request body
try {
- $vObject = VObject\Reader::read($this->server->httpRequest->getBody(true));
+ $vObject = VObject\Reader::read($this->server->httpRequest->getBody());
} catch (VObject\ParseException $e) {
throw new DAV\Exception\BadRequest('The request body must be a valid iCalendar object. Parse error: ' . $e->getMessage());
}
diff --git a/lib/Sabre/DAV/Client.php b/lib/Sabre/DAV/Client.php
index 2f4c2f8..b182047 100644
--- a/lib/Sabre/DAV/Client.php
+++ b/lib/Sabre/DAV/Client.php
@@ -239,7 +239,7 @@ class Client extends HTTP\Client {
throw new Exception('HTTP error: ' . $response->getStatus());
}
- $result = $this->parseMultiStatus($response->getBody(true));
+ $result = $this->parseMultiStatus($response->getBodyAsString());
// If depth was 0, we only return the top item
if ($depth===0) {
diff --git a/lib/Sabre/DAV/PartialUpdate/Plugin.php b/lib/Sabre/DAV/PartialUpdate/Plugin.php
index bba75ac..8f2304c 100644
--- a/lib/Sabre/DAV/PartialUpdate/Plugin.php
+++ b/lib/Sabre/DAV/PartialUpdate/Plugin.php
@@ -150,7 +150,7 @@ class Plugin extends DAV\ServerPlugin {
if (!$this->server->emit('beforeWriteContent', [$path, $node, null]))
return;
- $body = $request->getBody();
+ $body = $request->getBodyAsStream();
$etag = $node->putRange($body, $start-1);
$this->server->emit('afterWriteContent', [$path, $node]);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list