[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/class/mime Rfc822Header.class.php,1.17.2.14,1.17.2.15
From:       Thijs Kinkhorst <kink () users ! sourceforge ! net>
Date:       2004-02-28 15:00:51
Message-ID: E1Ax5xT-0005cz-7H () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/class/mime
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21557

Modified Files:
      Tag: SM-1_4-STABLE
	Rfc822Header.class.php 
Log Message:
Also support headers ending in just \n in stead of \r\n.


Index: Rfc822Header.class.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/class/mime/Rfc822Header.class.php,v
retrieving revision 1.17.2.14
retrieving revision 1.17.2.15
diff -u -w -r1.17.2.14 -r1.17.2.15
--- Rfc822Header.class.php	28 Feb 2004 14:45:44 -0000	1.17.2.14
+++ Rfc822Header.class.php	28 Feb 2004 15:00:49 -0000	1.17.2.15
@@ -41,12 +41,12 @@
         if (is_array($hdr)) {
             $hdr = implode('', $hdr);
         }
-        /* First we unfold the header */
-        $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $hdr));
+        /* First we replace \r\n by \n and unfold the header */
+        $hdr = trim(str_replace(array("\r\n", "\n\t", "\n "),array("\n", ' ', ' '), $hdr));
 
         /* Now we can make a new header array with */
         /* each element representing a headerline  */
-        $hdr = explode("\r\n" , $hdr);
+        $hdr = explode("\n" , $hdr);
         foreach ($hdr as $line) {
             $pos = strpos($line, ':');
             if ($pos > 0) {



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic