commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgoes...@apache.org
Subject svn commit: r1290883 - in /commons/proper/email/trunk/src/test: eml/outofmemory-no-header-seperation.eml org/apache/commons/mail/util/MimeMessageParserTest.java
Date Sat, 18 Feb 2012 21:33:05 GMT
Author: sgoeschl
Date: Sat Feb 18 21:33:05 2012
New Revision: 1290883

URL: http://svn.apache.org/viewvc?rev=1290883&view=rev
Log:
[EMAIL-110] Added unit test to ensure that parsing the broken mime message does not cause
an OutOfMemoryException

Added:
    commons/proper/email/trunk/src/test/eml/outofmemory-no-header-seperation.eml
Modified:
    commons/proper/email/trunk/src/test/org/apache/commons/mail/util/MimeMessageParserTest.java

Added: commons/proper/email/trunk/src/test/eml/outofmemory-no-header-seperation.eml
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/eml/outofmemory-no-header-seperation.eml?rev=1290883&view=auto
==============================================================================
--- commons/proper/email/trunk/src/test/eml/outofmemory-no-header-seperation.eml (added)
+++ commons/proper/email/trunk/src/test/eml/outofmemory-no-header-seperation.eml Sat Feb 18
21:33:05 2012
@@ -0,0 +1,148 @@
+Received: by 10.220.154.73 with HTTP; Fri, 13 Jan 2012 00:43:02 -0800 (PST)
+To: john@example.org
+From: jack@example.org
+Reply-To: jill@example.org
+Subject: A corrupt Attachment
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary=f46d043d64394dd4e404b664da85
+Doesnt matter
+
+--f46d043d64394dd4e404b664da85
+Content-Type: multipart/alternative; boundary=alt-f46d043d64394dd4e404b664da85
+--f46d043d64394dd4e404b664da85
+Content-Type: image/gif; name="feather-small.gif"
+Content-Disposition: attachment; filename="feather-small.gif"
+Content-Transfer-Encoding: base64
+R0lGODlhywA9APf/APRUVsPGx46PkW8nVt3d3q1TSuvr7J8bQJGpulUtbacrdf///7KQkK6RXDIi
+Md7e38hwVLNqUbcnbMxTTrqqY9sdWK+be6C4ybKrj9bk5c+SZmo0l7IqdEwoVNf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Ch
+HJ45XzT+MEFMOaN6msJHFrag/w50LMB5IyRhYhYAvSmk4x3pSIcJIKMO2RnAawehYWUGQpnLZOoB
++DiIM+oBmhSNKA/js4cZmkELPPhwfAvhTBby0BmF6OsPComGGczRoQ3twzIGoUwPc6hDBobNGy0M
+oQhLeEY0NsZR6HjHFKxhgAu9sR7jk0GHumeZ7+Vtgd4DET72qCkbfshuefSQMzz0h/FRjHqUIdGG
+LOMwEL0tCwawhjreYcY0ZlKTE2rUPxr1jneYIB3esEYpvRGLLEQjGviw42WuaMNKMbCLCyOAHx/p
+yG7sAx+xeAc6yogOFl6jhVOwh9uyQI50qMMb14heCDf5TGiarVHQu4YBOtPBLSmQwxsxrMcf/JiF
+Sm7BGgWbgtrUcY0tGMAbJthmPexhDRc+KITx9FdAAAA7
+--f46d043d64394dd4e404b664da85--

Modified: commons/proper/email/trunk/src/test/org/apache/commons/mail/util/MimeMessageParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/org/apache/commons/mail/util/MimeMessageParserTest.java?rev=1290883&r1=1290882&r2=1290883&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/org/apache/commons/mail/util/MimeMessageParserTest.java
(original)
+++ commons/proper/email/trunk/src/test/org/apache/commons/mail/util/MimeMessageParserTest.java
Sat Feb 18 21:33:05 2012
@@ -197,5 +197,31 @@ public class MimeMessageParserTest
         assertNotNull(dataSource);
         assertEquals("application/pdf", dataSource.getContentType());
     }
+    
+    /**
+     * This test parses an eml file published with issue EMAIL-110.
+     * This eml file has a corrupted attachment but should not create
+     * an OutOfMemoryException.
+     * 
+     * @throws Exception the test failed
+     */
+    public void testParseNoHeaderSeperatorWithOutOfMemory() throws Exception
+    {
+        Session session = Session.getDefaultInstance(new Properties());
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/outofmemory-no-header-seperation.eml"));
+        MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
+        mimeMessageParser.parse();
+
+        assertEquals("A corrupt Attachment", mimeMessageParser.getSubject());
+        assertNotNull(mimeMessageParser.getMimeMessage());
+        assertTrue(mimeMessageParser.isMultipart());
+        assertFalse(mimeMessageParser.hasHtmlContent());
+        assertFalse(mimeMessageParser.hasPlainContent());
+        assertNull(mimeMessageParser.getPlainContent());
+        assertNull(mimeMessageParser.getHtmlContent());
+        assertEquals(mimeMessageParser.getTo().size(), 1);
+        assertEquals(mimeMessageParser.getCc().size(), 0);
+        assertEquals(mimeMessageParser.getBcc().size(), 0);
+    }
 }



Mime
View raw message