[Pkg-owncloud-commits] [php-sabredav] 26/75: PUT and PATCH returns `getETag`…

David Prévot taffit at moszumanska.debian.org
Thu Feb 26 18:51:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 3adff21b76267648e9817200cfc159199e1370f3
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Thu Jan 8 09:08:15 2015 +0100

    PUT and PATCH returns `getETag`…
    
    … instead of recomputing something by themselves.
---
 lib/DAV/FSExt/File.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/DAV/FSExt/File.php b/lib/DAV/FSExt/File.php
index a5cb735..51f4e00 100644
--- a/lib/DAV/FSExt/File.php
+++ b/lib/DAV/FSExt/File.php
@@ -23,7 +23,7 @@ class File extends Node implements DAV\PartialUpdate\IPatchSupport {
     function put($data) {
 
         file_put_contents($this->path,$data);
-        return '"' . md5_file($this->path) . '"';
+        return $this->getETag();
 
     }
 
@@ -42,7 +42,7 @@ class File extends Node implements DAV\PartialUpdate\IPatchSupport {
      * The third argument is the start or end byte.
      *
      * After a successful put operation, you may choose to return an ETag. The
-     * etag must always be surrounded by double-quotes. These quotes must
+     * ETAG must always be surrounded by double-quotes. These quotes must
      * appear in the actual string you're returning.
      *
      * Clients may use the ETag from a PUT request to later on make sure that
@@ -75,7 +75,7 @@ class File extends Node implements DAV\PartialUpdate\IPatchSupport {
             stream_copy_to_stream($data,$f);
         }
         fclose($f);
-        return '"' . md5_file($this->path) . '"';
+        return $this->getETag();
 
     }
 

-- 
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