Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
drop first line from message if not a header
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwindell committed Jul 13, 2012
2 parents 02e6999 + 1ede9ce commit b6cdec7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Decode.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ public static function splitMessage($message, &$headers, &$body, $EOL = Mime::LI
return;
}

// see @ZF2-372, pops the first line off a message if it doesn't contain a header
$parts = explode(': ', $firstline, 2);
if (count($parts) != 2) {
$message = substr($message, strpos($message, $EOL)+1);
}

// find an empty line between headers and body
// default is set new line
if (strpos($message, $EOL . $EOL)) {
Expand Down

0 comments on commit b6cdec7

Please sign in to comment.