diff options
| author | fukachan <fukachan> | 2001-02-03 15:15:04 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-03 15:15:04 +0000 |
| commit | c7d058fd25ba2d1ee41c4d784c60484122abc742 (patch) | |
| tree | e919768eae1cfee3666755461408b5c0ce0b127c /fml/lib | |
| parent | 019b64ef3730fff1e50e138bde5c4490e933cfc5 (diff) | |
| download | fml8-c7d058fd25ba2d1ee41c4d784c60484122abc742.tar.gz fml8-c7d058fd25ba2d1ee41c4d784c60484122abc742.tar.bz2 fml8-c7d058fd25ba2d1ee41c4d784c60484122abc742.zip | |
we can print the tralior after the end of continuous multipart blocks
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/MailingList/Messages.pm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/fml/lib/MailingList/Messages.pm b/fml/lib/MailingList/Messages.pm index 7801c34c..dd98d997 100644 --- a/fml/lib/MailingList/Messages.pm +++ b/fml/lib/MailingList/Messages.pm @@ -288,10 +288,11 @@ sub parse_mime_multipart return undef unless $args->{ content }; # boundaries of the continuous multipart blocks - my $content = $args->{ content }; - my $boundary = $args->{ boundary }; - my $buf_begin = index($$content, $boundary , 0); - my $buf_end = index($$content, $boundary."--", 0); + my $content = $args->{ content }; + my $boundary = $args->{ boundary }; + my $content_length = length($$content); + my $buf_begin = index($$content, $boundary , 0); + my $buf_end = index($$content, $boundary."--", 0); # prepare lexical variables # pb = position of the beginning, pe = position of the end @@ -319,6 +320,16 @@ sub parse_mime_multipart }); } while ($pe <= $buf_end); + my $p = index($$content, "\n", $buf_end) + 1; + if (($content_length - $p) > 0) { + $m[ $i++ ] = _alloc_new_part($self, { + boundary => $boundary, + offset_begin => $p, + offset_end => $content_length, + content => $content, + }); + } + my $j = 0; for ($j = 0; $j < $i; $j++) { if (defined $m[ $j + 1 ]) { @@ -345,9 +356,6 @@ sub _alloc_new_part my $me = {}; _create($me, { - next => $args->{ next } || undef, - prev => $args->{ prev } || undef, - offset_begin => $args->{ offset_begin }, offset_end => $args->{ offset_end }, content => $args->{ content }, |
