geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Rushall (JIRA)" <j...@apache.org>
Subject [jira] Created: (GERONIMO-4259) javax.mail.MessagingException: java.io.IOException: Base64 encoding error, data truncated
Date Fri, 22 Aug 2008 10:56:44 GMT
javax.mail.MessagingException: java.io.IOException: Base64 encoding error, data truncated
-----------------------------------------------------------------------------------------

                 Key: GERONIMO-4259
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4259
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: mail
         Environment: geronimo-javamail_1.4_mail-1.4.jar
IBM JRE 6 SR 1
Windows XP
            Reporter: Dave Rushall


After getting an email with nested multipart content from a POP3 store, I get the following
exception when calling MimeMultipart.getCount() for the inner multi-part...

javax.mail.MessagingException: javax.mail.MessagingException: java.io.IOException: Base64
encoding error, data truncated (java.io.IOException: Base64 encoding error, data truncated)
(javax.mail.MessagingException: java.io.IOException: Base64 encoding error, data truncated
(java.io.IOException: Base64 encoding error, data truncated))
	at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:188)
	at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:104)
    ... *** application stack removed ***
Caused by: javax.mail.MessagingException: java.io.IOException: Base64 encoding error, data
truncated (java.io.IOException: Base64 encoding error, data truncated)
	at javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:241)
	at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:172)
	... 33 more
Caused by: java.io.IOException: Base64 encoding error, data truncated
	at org.apache.geronimo.mail.util.Base64DecoderStream.fillEncodedBuffer(Base64DecoderStream.java:166)
	at org.apache.geronimo.mail.util.Base64DecoderStream.decodeStreamData(Base64DecoderStream.java:93)
	at org.apache.geronimo.mail.util.Base64DecoderStream.getBytes(Base64DecoderStream.java:125)
	at org.apache.geronimo.mail.util.Base64DecoderStream.read(Base64DecoderStream.java:198)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:246)
	at java.io.FilterInputStream.read(FilterInputStream.java:89)
	at java.io.PushbackInputStream.read(PushbackInputStream.java:141)
	at javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:207)
	... 34 more

The debug log shows that the incoming message looks something like this...

RETR 1
+OK 1475 octets
Received: from [127.0.0.1] (****************************************)
	by *****************************************************************************
	for <*********************************>; Fri, 22 Aug 2008 11:16:53 +0100
Date: Fri, 22 Aug 2008 11:16:53 +0100
Message-Id: <200808221016.m7MAGmAj1548424@*************************>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="0_070831_929445734_1513380404_1219400205187"; charset="ISO-8859-1"
Subject: Test message
To: *********************************
From: *********************
Status: RO

--0_070831_929445734_1513380404_1219400205187
Content-Type: multipart/related;
   boundary="0_070831_1261849398_416815320_1219400210562";
   charset="ISO-8859-1"

--0_070831_1261849398_416815320_1219400210562
Content-Type: text/html;
   charset="UTF-8"
Content-Transfer-Encoding: base64

PGh0bWw+PGJvZHk+PHA+SGVsbG8gdGhlcmUhIEhvdyBhcmUgeW91IHRvZGF5PzwvcD48L2Jv
ZHk+PC9odG1sPg==
--0_070831_1261849398_416815320_1219400210562
Content-Location: inline1.txt
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: base64

SW5saW5lIDE=
--0_070831_1261849398_416815320_1219400210562--
--0_070831_929445734_1513380404_1219400205187
Content-Location: attachment1.txt
Content-Disposition: attachment;
   filename="attachment1.txt"
Content-Type: text/plain
Content-Transfer-Encoding: base64

QXR0YWNobWVudCAx
--0_070831_929445734_1513380404_1219400205187--



.

This same message can be decoded successfully by the other POP3 clients I've tried and the
Geronimo POP3 client implementation is able to decode these same base64-encoded parts when
the is no nested multi-part message.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message