summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-06 12:05:32 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-06 12:05:32 +0100
commitbc56fef619ca92665d5631a3293ecbff0f8e1330 (patch)
tree51e402bcb4e2dbce3da12a304d6d1912e231835c
parentbd60abbefc45f7fe1dce4ab0259b7be0f1ec515e (diff)
parent8210200770fa1e7afa2b96f4cb69d1be2064bcad (diff)
downloadnextcloud-server-bc56fef619ca92665d5631a3293ecbff0f8e1330.tar.gz
nextcloud-server-bc56fef619ca92665d5631a3293ecbff0f8e1330.zip
Merge pull request #13932 from owncloud/revert-sabredav-etag-master
Revert "adding OC-ETag header"
-rw-r--r--lib/private/connector/sabre/file.php15
-rw-r--r--lib/private/connector/sabre/filesplugin.php4
-rw-r--r--lib/private/connector/sabre/node.php16
3 files changed, 15 insertions, 20 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 12ce633838f..e57d04f9a6e 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 ff5a6cc8b4b..f6f0fac878b 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 3173ab8a30f..adc37849286 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() . '"';
- }
-
}