diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-11-11 15:42:50 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-11-11 15:42:50 +0100 |
commit | 0b2c24081f3e0963e28bdf5a5d0c81017553753e (patch) | |
tree | d01d2607c91fc62f90d9158eca7f7128eb26d4b5 | |
parent | 9368de5a8be5b77804fe7b9b1c8d66d5161f7f76 (diff) | |
download | nextcloud-server-0b2c24081f3e0963e28bdf5a5d0c81017553753e.tar.gz nextcloud-server-0b2c24081f3e0963e28bdf5a5d0c81017553753e.zip |
Return real mime type on PROPFIND
Return the real (insecure) mime type on PROPFIND
-rw-r--r-- | lib/private/connector/sabre/file.php | 4 |
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); } |