#326281 by Starnox, Private file transfers sending text/plain MIME type.
authorandrew morton
Fri, 31 Oct 2008 17:52:14 +0000 (17:52 +0000)
committerandrew morton
Fri, 31 Oct 2008 17:52:14 +0000 (17:52 +0000)
imagecache.module

index 512c8a0..a729f71 100644 (file)
@@ -414,14 +414,8 @@ function _imagecache_apply_action($action, &$image) {
  */
 
 function imagecache_transfer($path) {
-  if (function_exists('mime_content_type')) {
-    $mime = mime_content_type($path);
-  }
-  else {
-    $size = getimagesize($path);
-    $mime = $size['mime'];
-  }
-  $headers = array('Content-Type: '. mime_header_encode($mime));
+  $size = getimagesize($path);
+  $headers = array('Content-Type: '. mime_header_encode($size['mime']));
 
   if ($fileinfo = stat($path)) {
     $headers[] = 'Content-Length: '. $fileinfo[7];