Author: as
Date: Tue Nov 27 14:43:14 2007
New Revision: 6833

Log:
- Fixed issue #11965: Reading from a transport connection is stopped at CRLF
  or a problem in the connection, and not after a hard-coded number of loops.

Modified:
    trunk/Mail/ChangeLog
    trunk/Mail/src/transports/transport_connection.php

Modified: trunk/Mail/ChangeLog
==============================================================================
--- trunk/Mail/ChangeLog [iso-8859-1] (original)
+++ trunk/Mail/ChangeLog [iso-8859-1] Tue Nov 27 14:43:14 2007
@@ -5,6 +5,8 @@
   composed email.
 - Fixed issue #12062: Mails with no space or tabs after the colon in headers
   are parsed correctly now.
+- Fixed issue #11965: Reading from a transport connection is stopped at CRLF
+  or a problem in the connection, and not after a hard-coded number of loops.
 
 
 1.4alpha2 - Monday 29 October 2007

Modified: trunk/Mail/src/transports/transport_connection.php
==============================================================================
--- trunk/Mail/src/transports/transport_connection.php [iso-8859-1] (original)
+++ trunk/Mail/src/transports/transport_connection.php [iso-8859-1] Tue Nov 27 
14:43:14 2007
@@ -200,15 +200,15 @@
     {
         $data = '';
         $line   = '';
-        $loops  = 0;
-
-        if ( is_resource( $this->connection ) )
-        {
-            while ( ( strpos( $line, self::CRLF ) === false ) && $loops < 100 )
+
+        if ( is_resource( $this->connection ) )
+        {
+            // in case there is a problem with the connection fgets() returns 
false
+            while ( $line !== false
+                    && strpos( $line, self::CRLF ) === false )
             {
                 $line = fgets( $this->connection, 512 );
                 $data .= $line;
-                $loops++;
             }
 
             if ( $trim == false )


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to