From e9492f9e50a07c4e8c8eaa143f9553b54d69cf3c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 25 Nov 2009 17:26:54 -0700 Subject: [PATCH] Ignore empty headers when parsing text data. --- framework/Mime/lib/Horde/Mime/Headers.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/Mime/lib/Horde/Mime/Headers.php b/framework/Mime/lib/Horde/Mime/Headers.php index a056019d6..08c93aef8 100644 --- a/framework/Mime/lib/Horde/Mime/Headers.php +++ b/framework/Mime/lib/Horde/Mime/Headers.php @@ -607,6 +607,10 @@ class Horde_Mime_Headers reset($to_process); while (list(,$val) = each($to_process)) { + /* Ignore empty headers. */ + if (!strlen($val[1])) { + continue; + } if ($eightbit_check && Horde_Mime::is8bit($val[1])) { $val[1] = Horde_String::convertCharset($val[1], self::$defaultCharset); } @@ -621,4 +625,5 @@ class Horde_Mime_Headers return $headers; } + } -- 2.11.0