--- imagecache.module.OLD	2010-05-27 07:08:58.000000000 +1000
+++ imagecache.module	2010-10-01 23:38:47.000000000 +1000
@@ -378,7 +378,7 @@
       imagecache_transfer($accesspath);
       exit;
     }
-    header('HTTP/1.0 403 Forbidden');
+    drupal_access_denied();
     exit;
   }
 }
@@ -392,7 +392,7 @@
 function _imagecache_cache($presetname, $path) {
   if (!$preset = imagecache_preset_by_name($presetname)) {
     // Send a 404 if we don't know of a preset.
-    header("HTTP/1.0 404 Not Found");
+    drupal_not_found();
     exit;
   }
 
@@ -409,7 +409,7 @@
   // Check if the path to the file exists.
   if (!is_file($src) && !is_file($src = file_create_path($src))) {
     watchdog('imagecache', '404: Unable to find %image ', array('%image' => $src), WATCHDOG_ERROR);
-    header("HTTP/1.0 404 Not Found");
+    drupal_not_found();
     exit;
   };
 
@@ -417,7 +417,7 @@
   // etc...
   if (!getimagesize($src)) {
     watchdog('imagecache', '403: File is not an image %image ', array('%image' => $src), WATCHDOG_ERROR);
-    header('HTTP/1.0 403 Forbidden');
+    drupal_access_denied();
     exit;
   }
 
