Return real mime type on PROPFIND

Return the real (insecure) mime type on PROPFIND
remotes/origin/fix-10825
Vincent Petry 12 years ago
parent 9368de5a8b
commit 0b2c24081f
  1. 4
      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);
}

Loading…
Cancel
Save