]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "adding OC-ETag header"
authorVincent Petry <pvince81@owncloud.com>
Thu, 5 Feb 2015 19:43:37 +0000 (20:43 +0100)
committerVincent Petry <pvince81@owncloud.com>
Thu, 5 Feb 2015 19:43:37 +0000 (20:43 +0100)
This reverts commit 96a931929ea837a40a7e9b836252587c949a8127.

lib/private/connector/sabre/file.php
lib/private/connector/sabre/filesplugin.php
lib/private/connector/sabre/node.php

index 12ce633838f8c13af7bbdb875704ee0ffb907649..e57d04f9a6e8bc7fc4e1b0796a3ec635e7a6d2c9 100644 (file)
@@ -219,6 +219,21 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
                return $this->info->getSize();
        }
 
+       /**
+        * 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
         *
index ff5a6cc8b4b1dc260d79b9921a22351f8fbe62de..f6f0fac878b411f937e27713d438999203dd3990 100644 (file)
@@ -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);
-                       }
                }
        }
 
index 3173ab8a30fb03b71148c0d941ee2c9327473de3..adc37849286f7e0ac711861319741e2e03079352 100644 (file)
@@ -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() . '"';
-       }
-
 }