You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2008/07/14 15:49:57 UTC

svn commit: r676586 - /james/mime4j/trunk/src/test/resources/testmsgs/

Author: bago
Date: Mon Jul 14 06:49:56 2008
New Revision: 676586

URL: http://svn.apache.org/viewvc?rev=676586&view=rev
Log:
Adding some new messages proving bugs in the current implementation and differences from what we had in mime4j 0.2 result/testsuite.
Expected results have to be checked for correctness.

Added:
    james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts-base64_decoded.xml
    james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.msg
    james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.msg
    james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml   (with props)
    james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded_1_2_1.txt   (with props)
Removed:
    james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts-base64_decoded.mime4j.xml
    james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.mime4j.xml
    james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded_1_2_1.mime4j.txt

Added: james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts-base64_decoded.xml
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts-base64_decoded.xml?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts-base64_decoded.xml (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts-base64_decoded.xml Mon Jul 14 06:49:56 2008
@@ -0,0 +1,32 @@
+<message>
+<header>
+<field>
+Content-type: message/rfc822</field>
+<field>
+Content-transfer-encoding: base64</field>
+<field>
+Subject: a multipart message/rfc822 which has been base64-encoded</field>
+</header>
+<message>
+<header>
+<field>
+Content-Type: multipart/mixed; boundary="------------299A70B339B65A93542D2AE"</field>
+</header>
+<multipart>
+<preamble>
+This is a multi-part message in MIME format.
+</preamble>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain; charset=us-ascii</field>
+<field>
+Content-Transfer-Encoding: 7bit</field>
+</header>
+<text-body name="bad-newlines-multiple-parts-base64_decoded_1_1_1.txt"/>
+</body-part>
+<epilogue>
+</epilogue>
+</multipart>
+</message>
+</message>

Added: james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml Mon Jul 14 06:49:56 2008
@@ -0,0 +1,23 @@
+<message>
+<header>
+<field>
+Content-Type: multipart/mixed; boundary="------------299A70B339B65A93542D2AE"</field>
+</header>
+<multipart>
+<preamble>
+This is a multi-part message in MIME format.
+</preamble>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain; charset=us-ascii</field>
+<field>
+Content-Transfer-Encoding: 7bit</field>
+</header>
+<text-body name="bad-newlines-multiple-parts_decoded_1_1.txt"/>
+</body-part>
+<epilogue>
+That was a multi-part message in MIME format.
+</epilogue>
+</multipart>
+</message>

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/bad-newlines-multiple-parts_decoded.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.msg
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.msg?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.msg (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.msg Mon Jul 14 06:49:56 2008
@@ -0,0 +1,21 @@
+Content-Type: multipart/mixed; boundary="boundary"
+
+--boundary
+Content-Type: text/plain
+
+first part
+
+--boundary-- This should be already part of the epilogue.
+
+From the RFC about ending boundary:
+
+===================================================================
+NOTE TO IMPLEMENTORS:  Boundary string comparisons must compare the
+boundary value with the beginning of each candidate line.  An exact
+match of the entire candidate line is not required; it is sufficient
+that the boundary appear in its entirety following the CRLF.
+===================================================================
+
+--boundary--
+
+The above boundary should be part of the epilogue, too.
\ No newline at end of file

Added: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml Mon Jul 14 06:49:56 2008
@@ -0,0 +1,34 @@
+<message>
+<header>
+<field>
+Content-Type: multipart/mixed; boundary="boundary"</field>
+</header>
+<multipart>
+<preamble>
+</preamble>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain</field>
+</header>
+<body>
+first part
+</body>
+</body-part>
+<epilogue>
+ This should be already part of the epilogue.
+
+From the RFC about ending boundary:
+
+===================================================================
+NOTE TO IMPLEMENTORS:  Boundary string comparisons must compare the
+boundary value with the beginning of each candidate line.  An exact
+match of the entire candidate line is not required; it is sufficient
+that the boundary appear in its entirety following the CRLF.
+===================================================================
+
+--boundary--
+
+The above boundary should be part of the epilogue, too.</epilogue>
+</multipart>
+</message>

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml Mon Jul 14 06:49:56 2008
@@ -0,0 +1,32 @@
+<message>
+<header>
+<field>
+Content-Type: multipart/mixed; boundary="boundary"</field>
+</header>
+<multipart>
+<preamble>
+</preamble>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain</field>
+</header>
+<text-body name="ending-boundaries_decoded_1_1.txt"/>
+</body-part>
+<epilogue>
+ This should be already part of the epilogue.
+
+From the RFC about ending boundary:
+
+===================================================================
+NOTE TO IMPLEMENTORS:  Boundary string comparisons must compare the
+boundary value with the beginning of each candidate line.  An exact
+match of the entire candidate line is not required; it is sufficient
+that the boundary appear in its entirety following the CRLF.
+===================================================================
+
+--boundary--
+
+The above boundary should be part of the epilogue, too.</epilogue>
+</multipart>
+</message>

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt Mon Jul 14 06:49:56 2008
@@ -0,0 +1 @@
+first part

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/ending-boundaries_decoded_1_1.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.msg
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.msg?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.msg (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.msg Mon Jul 14 06:49:56 2008
@@ -0,0 +1,36 @@
+Content-Type: multipart/mixed; boundary="boundary"
+
+preamble
+
+--boundary
+Content-Type: text/plain
+
+first part
+
+--boundary    
+Content-Type: text/plain
+
+from the rfc:
+================================
+encapsulation := delimiter transport-padding
+                      CRLF body-part
+================================
+and also
+================================
+"Composers MUST NOT generate non-zero length transport
+padding, but receivers MUST be able to handle padding
+added by message transports."
+================================
+
+second part have a start boundary ending with spaces
+and also have a boundary not at the beginning
+ --boundary
+... that should be ignored
+
+also a boundary with more data (a tab) shoud be ignored
+ --boundary	
+ 
+end of part
+
+--boundary--
+epilouge
\ No newline at end of file

Added: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml Mon Jul 14 06:49:56 2008
@@ -0,0 +1,52 @@
+<message>
+<header>
+<field>
+Content-Type: multipart/mixed; boundary="boundary"</field>
+</header>
+<multipart>
+<preamble>
+preamble
+</preamble>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain</field>
+</header>
+<body>
+first part
+</body>
+</body-part>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain</field>
+</header>
+<body>
+from the rfc:
+================================
+encapsulation := delimiter transport-padding
+                      CRLF body-part
+================================
+and also
+================================
+"Composers MUST NOT generate non-zero length transport
+padding, but receivers MUST be able to handle padding
+added by message transports."
+================================
+
+second part have a start boundary ending with spaces
+and also have a boundary not at the beginning
+ --boundary
+... that should be ignored
+
+also a boundary with more data (a tab) shoud be ignored
+ --boundary	
+ 
+end of part
+
+</body>
+</body-part>
+<epilogue>
+epilouge</epilogue>
+</multipart>
+</message>

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt Mon Jul 14 06:49:56 2008
@@ -0,0 +1 @@
+first part

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_1.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt Mon Jul 14 06:49:56 2008
@@ -0,0 +1,21 @@
+from the rfc:
+================================
+encapsulation := delimiter transport-padding
+                      CRLF body-part
+================================
+and also
+================================
+"Composers MUST NOT generate non-zero length transport
+padding, but receivers MUST be able to handle padding
+added by message transports."
+================================
+
+second part have a start boundary ending with spaces
+and also have a boundary not at the beginning
+  --boundary
+... that should be ignored
+
+also a boundary with more data (a tab) shoud be ignored
+ --boundary	
+ 
+end of part

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/intermediate-boundaries_decoded_1_2.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml?rev=676586&view=auto
==============================================================================
--- james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml (added)
+++ james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml Mon Jul 14 06:49:56 2008
@@ -0,0 +1,41 @@
+<message>
+<header>
+<field>
+Content-Type: multipart/mixed; boundary="outer-boundary"</field>
+</header>
+<multipart>
+<preamble>
+Outer preamble
+</preamble>
+<body-part>
+<header>
+<field>
+Content-Type: text/plain</field>
+</header>
+<text-body name="missing-inner-boundary_decoded_1_1.txt"/>
+</body-part>
+<body-part>
+<header>
+<field>
+Content-Type: multipart/alternative; boundary="inner-boundary"</field>
+</header>
+<multipart>
+<preamble>
+AAA
+
+--outer-boundary--
+Outer epilouge
+</preamble>
+<body-part>
+<header>
+</header>
+<text-body name="missing-inner-boundary_decoded_1_2_1.txt"/>
+</body-part>
+<epilogue>
+</epilogue>
+</multipart>
+</body-part>
+<epilogue>
+</epilogue>
+</multipart>
+</message>

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded_1_2_1.txt
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded_1_2_1.txt?rev=676586&view=auto
==============================================================================
    (empty)

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded_1_2_1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: james/mime4j/trunk/src/test/resources/testmsgs/missing-inner-boundary_decoded_1_2_1.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org