[
https://issues.apache.org/jira/browse/GERONIMO-6871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17901173#comment-17901173
]
Jean-Louis Monteiro edited comment on GERONIMO-6871 at 11/26/24 11:19 AM:
--------------------------------------------------------------------------
Thanks for the patch Markus.
Thanks Richard for the review and merge.
Looks good to me.
was (Author: [email protected]):
Thanks for the patch Markus.
Looks good to me.
> InternetHeaders to rejects well-formed headers
> ----------------------------------------------
>
> Key: GERONIMO-6871
> URL: https://issues.apache.org/jira/browse/GERONIMO-6871
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: Mail_2.1_1.0.0
> Reporter: Markus Jung
> Assignee: Richard Zowalla
> Priority: Blocker
> Labels: patch-available
> Fix For: Mail_2.1_1.0.1
>
> Attachments: GERONIMO-6871.patch
>
>
> GERONIMO-6870 introduced a bug causing InternetHeaders to reject well-formed
> headers.
>
> Some example code says more than 1000 words:
> {code:java}
> @Test // fails
> public void returnPathHeader() throws MessagingException {
> new InternetHeaders(new ByteArrayInputStream("Return-Path:
> bla".getBytes()), true);
> }
> @Test // fails
> public void receivedHeader() throws MessagingException {
> new InternetHeaders(new ByteArrayInputStream("Received:
> bla".getBytes()), true);
> }
> @Test // passes
> public void otherHeaderNotDuplicated() throws MessagingException {
> new InternetHeaders(new ByteArrayInputStream("Bla: bla".getBytes()),
> true);
> }
> @Test // passes
> public void actuallyDuplicatedHeader() throws MessagingException {
> assertThrows(IllegalStateException.class, () -> new
> InternetHeaders(new ByteArrayInputStream("Bla: bla\nBla: blub".getBytes()),
> true));
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)