aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-11-12 09:16:26 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-11-12 09:16:26 +0100
commit9aef0421cfc98c98db81c777c1be5a9315324381 (patch)
tree0c2298aefed644e7cb89dfac84a822bc9978c831
parent1846fb02852b69de31d27c90e02c6a40379ba749 (diff)
parent0b2c24081f3e0963e28bdf5a5d0c81017553753e (diff)
downloadnextcloud-server-9aef0421cfc98c98db81c777c1be5a9315324381.tar.gz
nextcloud-server-9aef0421cfc98c98db81c777c1be5a9315324381.zip
Merge pull request #12107 from owncloud/dav-propfindmimetype
Return real mime type on PROPFIND
-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 3705d299bfc..d93b8e68eb6 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -219,6 +219,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);
}