Parcourir la source

Make header checking case insensitive

indiri69 il y a 23 ans
Parent
commit
fdc0c3febc
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      functions/imap_messages.php

+ 4 - 4
functions/imap_messages.php

@@ -525,9 +525,9 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list) {
 
 
         foreach ($read as $read_part) {
         foreach ($read as $read_part) {
             //unfold multi-line headers
             //unfold multi-line headers
-	    if ($prevline && strpos($read_part, "\t ") === true) {
-	        $read_part = substr($prevline, 0, -2) . preg_replace('/(\t\s+)/',' ',$read_part);
-	    }
+            if ($prevline && strpos($read_part, "\t ") === true) {
+                $read_part = substr($prevline, 0, -2) . preg_replace('/(\t\s+)/',' ',$read_part);
+            }
             $prevline = $read_part;
             $prevline = $read_part;
             if ($read_part{0} == '*') {
             if ($read_part{0} == '*') {
                 if ($internaldate) {
                 if ($internaldate) {
@@ -562,7 +562,7 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list) {
                     $unique_id = $reg[1];
                     $unique_id = $reg[1];
                 }
                 }
             } else {
             } else {
-                $firstchar = $read_part{0};
+                $firstchar = strtoupper($read_part{0});
                 if ($firstchar == 'T') {
                 if ($firstchar == 'T') {
                     $regpattern = $patterns[0];
                     $regpattern = $patterns[0];
                     $id = 1;
                     $id = 1;