jakartaee / jakartaee/mail-api

addHeader creating a duplicate header entry

Open
#433 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
285
Forks
109
Avg merge
15h 19m
Merged PRs (30d)
1

Description

**Describe the bug**
Add header creating a duplicate header. This leads to silent drop of one of the header (the latter in the header list).
**To Reproduce**
Steps to reproduce the behavior:
1. Create MimeMessage
2. Add header "Message-Id"

**Expected behavior**
Added Message-Id should be preserved but due to duplicates in the header list the added Message-Id is ignored.

**Screenshots**
![duplicate-message-id-header](https://user-images.githubusercontent.com/8767796/76986825-7cc0f580-6942-11ea-9fe2-6f5aac451e26.png)

**Additional context**
Workaround: use setHeader in conjunction with https://github.com/eclipse-ee4j/mail/issues/432 fix.

Contributor guide

Open the contributing guide

Research direction

Start with the MimeMessage addHeader reproduction described in this issue and compare its behavior with setHeader and the fix referenced in issue 432. Verify that adding Message-Id does not leave duplicate entries and that the added value is preserved rather than silently dropped; the payload does not name a file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.