[Pkg-owncloud-commits] [owncloud] 17/90: Return real mime type on PROPFIND

David Prévot taffit at moszumanska.debian.org
Fri Feb 6 21:10:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 0eb3496ab6a72036baf279a665a4ce7a38a036b0
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Tue Nov 11 15:42:50 2014 +0100

    Return real mime type on PROPFIND
    
    Return the real (insecure) mime type on PROPFIND
---
 lib/private/connector/sabre/file.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 64f05f7..79a01d8 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);
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list