summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/node.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-08-29 12:09:33 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-08-29 12:09:33 +0200
commit96a931929ea837a40a7e9b836252587c949a8127 (patch)
tree543aa94b3ad53eafb752e7b05429ab0eea5d245b /lib/private/connector/sabre/node.php
parented2424c3822a3470065788ff113a3807d24d80dc (diff)
downloadnextcloud-server-96a931929ea837a40a7e9b836252587c949a8127.tar.gz
nextcloud-server-96a931929ea837a40a7e9b836252587c949a8127.zip
adding OC-ETag header
Diffstat (limited to 'lib/private/connector/sabre/node.php')
-rw-r--r--lib/private/connector/sabre/node.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php
index 6fc66377ba8..2ac7363a15e 100644
--- a/lib/private/connector/sabre/node.php
+++ b/lib/private/connector/sabre/node.php
@@ -270,4 +270,20 @@ 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() . '"';
+ }
+
}