From 7803ab46be1444740d8dfd752d78b2a6fab6bb56 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 15 Apr 2011 16:02:00 -0700 Subject: [PATCH] Fix continued line parsing --- mailboxes/boxes-lib.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mailboxes/boxes-lib.pl b/mailboxes/boxes-lib.pl index ae50312a2..e89c28f2a 100755 --- a/mailboxes/boxes-lib.pl +++ b/mailboxes/boxes-lib.pl @@ -415,7 +415,7 @@ if ($ct =~ /multipart\/(\S+)/i && ($ct =~ /boundary="([^"]+)"/i || push(@headers, [ $1, $2 ]); } elsif ($lines[$l] =~ /^\s+(.*)/) { - $headers[$#headers]->[1] .= $1 + $headers[$#headers]->[1] .= " ".$1 unless($#headers < 0); } $l++; @@ -426,7 +426,7 @@ if ($ct =~ /multipart\/(\S+)/i && ($ct =~ /boundary="([^"]+)"/i || foreach $h (@headers) { $attach->{'header'}->{lc($h->[0])} = $h->[1]; } - if ($attach->{'header'}->{'content-type'} =~ /^([^;]+)/) { + if ($attach->{'header'}->{'content-type'} =~ /^([^;\s]+)/) { $attach->{'type'} = lc($1); } else { @@ -2359,7 +2359,7 @@ while(1) { $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^\s+(.*)/) { - $headers[$#headers]->[1] .= $1 unless($#headers < 0); + $headers[$#headers]->[1] .= " ".$1 unless($#headers < 0); $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^From\s+(\S+).*\d+/ &&