diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-05-15 23:07:35 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-05-15 23:07:35 +0200 |
commit | 5e2fe0d195fb8b9c67c346cc8a5218082ccf0588 (patch) | |
tree | c33ef1d0a95549fe0bf56cc76f53d11f903aa73b /program/lib/Roundcube/rcube_smtp.php | |
parent | 3e78fc7fdf23f752ecad3874b196dceaf529976f (diff) | |
parent | 43079d8e2dbd8e195b63dd8fb9f5251ae7c66248 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/rcube_smtp.php')
-rw-r--r-- | program/lib/Roundcube/rcube_smtp.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php index 6ba766672..60b1389ea 100644 --- a/program/lib/Roundcube/rcube_smtp.php +++ b/program/lib/Roundcube/rcube_smtp.php @@ -33,7 +33,7 @@ class rcube_smtp // define headers delimiter const SMTP_MIME_CRLF = "\r\n"; - const DEBUG_LINE_LENGTH = 4096; + const DEBUG_LINE_LENGTH = 4098; // 4KB + 2B for \r\n /** @@ -330,8 +330,9 @@ class rcube_smtp public function debug_handler(&$smtp, $message) { if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) { - $message = substr_replace($message, "\n-----[debug cut]----\n", - self::DEBUG_LINE_LENGTH/2 - 11, $len - self::DEBUG_LINE_LENGTH - 22); + $diff = $len - self::DEBUG_LINE_LENGTH; + $message = substr($message, 0, self::DEBUG_LINE_LENGTH) + . "... [truncated $diff bytes]"; } rcube::write_log('smtp', preg_replace('/\r\n$/', '', $message)); |