You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2018. It is now read-only.
.. but org.jvnet.mimepull parses this as a part with no headers and a content of "Content-Disposition: form-data; name=message"
This is demonstrated in the following failing Scala test:
import collection.JavaConversions._
import java.io._
class MimeParserSpec
extends Specification {
"org.jvnet.mimepull should understand empty BodyParts" in new Scope {
val body = """mime preamble
mime preamble
--rNmigcMAf6HIo0Q2xJ9-vjkH
Content-Disposition: form-data; name=root-fields
--rNmigcMAf6HIo0Q2xJ9-vjkH--"""
val mm = new org.jvnet.mimepull.MIMEMessage(
new ByteArrayInputStream(body.getBytes), "rNmigcMAf6HIo0Q2xJ9-vjkH")
mm.parseAll()
mm.getAttachments.toList must beLike {
case List(att) =>
CharStreams.toString(new InputStreamReader(att.readOnce)) mustEqual ""
}
}
}
.. this fails with 'Content-Disposition: form-data; name=root-fields' is not equal to ''