[Pkg-owncloud-commits] [php-sabredav] 77/163: Don't use server->httpRequest
David Prévot
taffit at moszumanska.debian.org
Tue May 20 18:54:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag upstream/2.0.0_beta1
in repository php-sabredav.
commit bdd8aaa578021a3cae63c9a15f63589d60ff8bc2
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Tue Apr 15 00:11:44 2014 -0400
Don't use server->httpRequest
---
lib/Sabre/DAV/PartialUpdate/Plugin.php | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/Sabre/DAV/PartialUpdate/Plugin.php b/lib/Sabre/DAV/PartialUpdate/Plugin.php
index 4c60a12..bfce0b6 100644
--- a/lib/Sabre/DAV/PartialUpdate/Plugin.php
+++ b/lib/Sabre/DAV/PartialUpdate/Plugin.php
@@ -118,7 +118,7 @@ class Plugin extends DAV\ServerPlugin {
throw new DAV\Exception\MethodNotAllowed('The target resource does not support the PATCH method.');
}
- $range = $this->getHTTPUpdateRange();
+ $range = $this->getHTTPUpdateRange($request);
if (!$range) {
throw new DAV\Exception\BadRequest('No valid "X-Update-Range" found in the headers');
@@ -173,11 +173,12 @@ class Plugin extends DAV\ServerPlugin {
* If the second offset is null, it should be treated as the offset of the last byte of the entity
* If the first offset is null, the second offset should be used to retrieve the last x bytes of the entity
*
+ * @param RequestInterface $request
* @return array|null
*/
- public function getHTTPUpdateRange() {
+ public function getHTTPUpdateRange(RequestInterface $request) {
- $range = $this->server->httpRequest->getHeader('X-Update-Range');
+ $range = $request->getHeader('X-Update-Range');
if (is_null($range)) return null;
// Matching "Range: bytes=1234-5678: both numbers are optional
--
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