diff options
| author | fukachan <fukachan> | 2001-02-16 03:37:14 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-16 03:37:14 +0000 |
| commit | b571e9e95e02bcdaaf0002e0d6ffa5295920b75f (patch) | |
| tree | 7c519688415a898acd583bfed74021ae0e94e52d | |
| parent | efe4226f622f9f8f638afeb4b6f8bdb5eb5a4353 (diff) | |
| download | fml8-b571e9e95e02bcdaaf0002e0d6ffa5295920b75f.tar.gz fml8-b571e9e95e02bcdaaf0002e0d6ffa5295920b75f.tar.bz2 fml8-b571e9e95e02bcdaaf0002e0d6ffa5295920b75f.zip | |
debug content_type in a message chain
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 6 | ||||
| -rw-r--r-- | fml/lib/MailingList/Messages.pm | 18 |
2 files changed, 20 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 56a01336..e5db3b6e 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -105,6 +105,12 @@ sub _distribute # get sequence number my $id = $ah->increment_id; + # XXX debug, remove here in the future + { + my $ha_msg = $curproc->{ article }->{ body }->get_content_type_list; + for (@$ha_msg) { Log($_);} + } + # ticket system checks the message before header rewritings. $curproc->_ticket_check($args) if $config->yes('use_ticket'); diff --git a/fml/lib/MailingList/Messages.pm b/fml/lib/MailingList/Messages.pm index a67bb670..cffd3895 100644 --- a/fml/lib/MailingList/Messages.pm +++ b/fml/lib/MailingList/Messages.pm @@ -626,10 +626,7 @@ sub parse_and_build_mime_multipart_chain sub _get_content_type { my ($args, $default) = @_; - my $content = $args->{ content }; - my $pos_begin = $args->{ offset_begin }; - my $pos = index($$content, "\n\n", $pos_begin); - my $buf = substr($$content, $pos_begin, $pos - $pos_begin ); + my $buf = $args->{ header } || ''; if ($buf =~ /Content-Type:\s*(\S+)\;/) { return $1; @@ -885,6 +882,19 @@ sub set_log_function } +# XXX debug, remove here in the future +sub get_content_type_list +{ + my ($msg) = @_; + my ($m, @buf, $i); + + for ($i = 0, $m = $msg; defined $m ; $m = $m->{ next }) { + $i++; + push(@buf, "type[$i]: $m->{'content_type'} | $m->{'base_content_type'}"); + } + \@buf; +} + =head1 APPENDIX (RFC2046 Appendix A) |
