From: | Adrian <adrian [...] quantumcat.org> |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Subject: | bug: Mail::IMAPClient::BodyStructure::Parse chokes on some messages |
Date: | Sun, 19 Jan 2003 11:34:31 -0500 |
Hello.
I've found two bugs, actually:
1) In some circumstances, not all server output in response to the command
FETCH BODYSTRUCTURE reaches Mail::IMAPClient::BodyStructure::Parser (see
attached file bug1.txt) -- some of it is truncated. I suspect it's because
sometimes the server splits the output on multiple lines (see raw_output.txt,
which contains the server response to FETCH BODYSTRUCTURE in raw form), while
IMAPClient expects all the relevant output in one line.
2) With the help of a really crude hack, I managed to get IMAPClient to pass
all the FETCH BODYSTRUCTURE output to the BodyStructure parser, but the
parser seems to choke on it (see attached bug2.txt).
Environment details:
Redhat Linux 8.0, kernel 2.4.19
Mail::IMAPClient 2.2.6
Perl: 5.8.0
UW imap 2001a
How to reproduce the bug: as far as I can tell, both bugs only show up when
processing messages containing MIME parts nested at least 3 levels deep. I
just picked a random message that had a few pictures attached from my inbox
and used the "Forward as attachment" function of my MUA to forward it to a
test account. Calling FETCH BODYSTRUCTURE on such a message triggers the
bugs.
Files attached to this message:
test.pl - the script I used to test the bugs
bug1.txt - log of session that shows first bug in action
bug2.txt - log of session that shows second bug
raw_output.txt - raw output of FETCH BODYSTRUCTURE server response as returned
by $imap->fetch(1, "BODYSTRUCTURE") to show that it is split across multiple
lines
For your convenience, I've also enabled tracing for
Mail::IMAPClient::BodyStructure::Parser.
Hope this helps.
Adrian.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.