[
https://issues.apache.org/jira/browse/HTTPCLIENT-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17061495#comment-17061495
]
Oleg Kalnichevski commented on HTTPCLIENT-2064:
-----------------------------------------------
[~michael-o] There is an ASF project mime4j that provides all this and much more
[http://james.apache.org/mime4j/]
In the early days of HttpClient 4.x there was a plan to have mime4j as a
dependency instead of providing competing MIME APIs. Mime4j has never reached a
1.0 GA milestone, the plan got derailed and we ended up with HttpMime module in
HttpClient. However one should still rather use Mime4j for anything
non-trivial.
Oleg
> MultipartEntityBuilder should support preamble and epilog
> ---------------------------------------------------------
>
> Key: HTTPCLIENT-2064
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2064
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient (classic)
> Affects Versions: 5.0
> Reporter: Michael Osipov
> Priority: Major
>
> According to RFC 2046, section 5.1.1 one can augment the multipart message
> with a preamble and an epilog. Both may consist of:
>
> {noformat}
> multipart-body := [preamble CRLF]
> dash-boundary transport-padding CRLF
> body-part *encapsulation
> close-delimiter transport-padding
> [CRLF epilogue]
> preamble := discard-text
> epilogue := discard-text
> discard-text := *(*text CRLF) *text
> ; May be ignored or discarded.
> {noformat}
> {{text}} is defined in RFC 822, section 3.3 as:
> {noformat}
> text = <any CHAR, including bare ; => atoms, specials,
> CR & bare LF, but NOT ; comments and
> including CRLF> ; quoted-strings are
> ; NOT recognized.
> {noformat}
> {{CHAR}} is 0 to 127.
> This could be added as
> {code}
> MultipartEntityBuilder#addPreamble()
> MultipartEntityBuilder#addEpilog()
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]