[Pkg-owncloud-commits] [owncloud] 13/34: Revert "adding OC-ETag header"

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:49:36 UTC 2015


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

taffit pushed a commit to annotated tag v8.0.0
in repository owncloud.

commit 8210200770fa1e7afa2b96f4cb69d1be2064bcad
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Thu Feb 5 20:43:37 2015 +0100

    Revert "adding OC-ETag header"
    
    This reverts commit 96a931929ea837a40a7e9b836252587c949a8127.
---
 lib/private/connector/sabre/file.php        | 15 +++++++++++++++
 lib/private/connector/sabre/filesplugin.php |  4 ----
 lib/private/connector/sabre/node.php        | 16 ----------------
 3 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 12ce633..e57d04f 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -220,6 +220,21 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
 	}
 
 	/**
+	 * Returns the ETag for a file
+	 *
+	 * An ETag is a unique identifier representing the current version of the
+	 * file. If the file changes, the ETag MUST change.  The ETag is an
+	 * arbitrary string, but MUST be surrounded by double-quotes.
+	 *
+	 * Return null if the ETag can not effectively be determined
+	 *
+	 * @return mixed
+	 */
+	public function getETag() {
+		return '"' . $this->info->getEtag() . '"';
+	}
+
+	/**
 	 * Returns the mime-type for a file
 	 *
 	 * If null is returned, we'll assume application/octet-stream
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index ff5a6cc..f6f0fac 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -123,10 +123,6 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
 			if (!is_null($fileId)) {
 				$this->server->httpResponse->setHeader('OC-FileId', $fileId);
 			}
-			$eTag = $node->getETag();
-			if (!is_null($eTag)) {
-				$this->server->httpResponse->setHeader('OC-ETag', $eTag);
-			}
 		}
 	}
 
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php
index 3173ab8..adc3784 100644
--- a/lib/private/connector/sabre/node.php
+++ b/lib/private/connector/sabre/node.php
@@ -281,20 +281,4 @@ abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\I
 		}
 		return $p;
 	}
-
-	/**
-	 * Returns the ETag for a file
-	 *
-	 * An ETag is a unique identifier representing the current version of the
-	 * file. If the file changes, the ETag MUST change.  The ETag is an
-	 * arbitrary string, but MUST be surrounded by double-quotes.
-	 *
-	 * Return null if the ETag can not effectively be determined
-	 *
-	 * @return mixed
-	 */
-	public function getETag() {
-		return '"' . $this->info->getEtag() . '"';
-	}
-
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list