--- includes/theme.inc	2009-04-22 11:12:01.249555500 -0400
+++ includes/theme.inc	2009-04-24 09:50:53.635738000 -0400
@@ -1820,7 +1820,11 @@ function template_preprocess_page(&$vari
 
   // Add favicon.
   if (theme_get_setting('toggle_favicon')) {
-    drupal_add_html_head('<link rel="shortcut icon" href="' . check_url(theme_get_setting('favicon')) . '" type="image/x-icon" />');
+    $icontype = file_get_mimetype(theme_get_setting('favicon');
+    if ($icontype == 'application/octet-stream') {
+      $icontype = 'image/x-icon';
+    }
+    drupal_add_html_head('<link rel="shortcut icon" href="' . check_url(theme_get_setting('favicon')) . '" type="' . $icontype . '" />');
   }
 
   // Set up layout variable.
