Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-11-11 17:42:50 +0300
committerMorris Jobke <hey@morrisjobke.de>2014-12-12 10:29:44 +0300
commit0eb3496ab6a72036baf279a665a4ce7a38a036b0 (patch)
tree8b1c1a63c6b653225cca09efa10939c2498c5fb0 /lib/private
parentbd06b4cf420af8dde1cb33ff6c8d379e1cfeb1ed (diff)
Return real mime type on PROPFIND
Return the real (insecure) mime type on PROPFIND
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/connector/sabre/file.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 64f05f75108..79a01d85a41 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -229,6 +229,10 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
public function getContentType() {
$mimeType = $this->info->getMimetype();
+ // PROPFIND needs to return the correct mime type, for consistency with the web UI
+ if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PROPFIND' ) {
+ return $mimeType;
+ }
return \OC_Helper::getSecureMimeType($mimeType);
}