--- theme.inc	2009-03-27 11:11:29.951768800 -0400
+++ theme.inc	2009-04-06 10:13:44.211048700 -0400
@@ -1752,7 +1752,10 @@
 function template_preprocess_page(&$variables) {
   // Add favicon
   if (theme_get_setting('toggle_favicon')) {
-    drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />');
+    if (($icontype=file_get_mimetype(theme_get_settings('favicon'))) == 'application/octet-strem') {
+      $icontype = 'image/x-icon';
+    }
+    drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="' . $icontype . '" />');
   }
 
   global $theme;
