You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Markus Jung (Jira)" <ji...@apache.org> on 2024/10/02 13:54:00 UTC
[jira] [Commented] (GERONIMO-6871) InternetHeaders to rejects well-formed headers
[ https://issues.apache.org/jira/browse/GERONIMO-6871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17886396#comment-17886396 ]
Markus Jung commented on GERONIMO-6871:
---------------------------------------
ideally 1.0.1 could be released after the patch is merged
> 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
> Priority: Blocker
> Labels: patch-available
> 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)