XHTML1.0 preparation for my favourite plugin ;)
[squirrelmail.git] / src / redirect.php
index bcc939e256a8bc5b37648b4e6112973abcc992db..44ef302728702927534bab59b0e39463034b8c94 100644 (file)
@@ -129,10 +129,6 @@ sqsession_register($attachment_common_types_parsed, 'attachment_common_types_par
 
 $debug = false;
 
-if (isset($_SERVER['HTTP_ACCEPT']) &&
-    !isset($attachment_common_types_parsed[$_SERVER['HTTP_ACCEPT']])) {
-    attachment_common_parse($_SERVER['HTTP_ACCEPT'], $debug);
-}
 if (isset($_SERVER['HTTP_ACCEPT']) &&
     !isset($attachment_common_types_parsed[$_SERVER['HTTP_ACCEPT']])) {
     attachment_common_parse($_SERVER['HTTP_ACCEPT'], $debug);
@@ -186,6 +182,14 @@ function attachment_common_parse($str, $debug) {
     global $attachment_common_types, $attachment_common_types_parsed;
 
     $attachment_common_types_parsed[$str] = true;
+    
+    /* 
+     * Replace ", " with "," and explode on that as Mozilla 1.x seems to  
+     * use "," to seperate whilst IE, and earlier versions of Mozilla use
+     * ", " to seperate
+     */
+    
+    $str = str_replace( ', ' , ',' , $str );
     $types = explode(', ', $str);
 
     foreach ($types as $val) {