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 "Stefano Bagnara (JIRA)" <se...@james.apache.org> on 2008/02/24 23:11:15 UTC

[jira] Updated: (MIME4J-39) writeTo in Multipart forgets the boundary-prefix

     [ https://issues.apache.org/jira/browse/MIME4J-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Bagnara updated MIME4J-39:
----------------------------------

    Affects Version/s: 0.3

I guess this report is about mime4j 0.3 sources. Please make sure you write the version in the next reports.

> writeTo in Multipart forgets the boundary-prefix
> ------------------------------------------------
>
>                 Key: MIME4J-39
>                 URL: https://issues.apache.org/jira/browse/MIME4J-39
>             Project: Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.3
>            Reporter: Aljoscha Rittner
>             Fix For: 0.4
>
>
> Current implementation (in Multipart.writeTo):
>         for (int i = 0; i < bodyParts.size(); i++) {
>             writer.write(boundary + "\r\n");
>             ((BodyPart) bodyParts.get(i)).writeTo(out);
>         } 
> But we need:
>         for (int i = 0; i < bodyParts.size(); i++) {
>             writer.write("--" + boundary + "\r\n");
>             writer.flush();
>             ((BodyPart) bodyParts.get(i)).writeTo(out);
>         } 
> Every starting boundary needs a prefix "--".  (and we need the flush for the BufferedWriter).
> Without this prefix, it's impossible to read Multipart-Messages.
> best regards,
>   josh.

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


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