This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new a1e35fd244 JAMES-3872 JMAP: Attachment read level cannot serve headers
(#2870)
a1e35fd244 is described below
commit a1e35fd244a0669fe38fd10f806bf3aaf6e40001
Author: Benoit TELLIER <[email protected]>
AuthorDate: Sat Nov 29 19:03:30 2025 +0100
JAMES-3872 JMAP: Attachment read level cannot serve headers (#2870)
Previous implementation lied by reusing Emil headers as body part
headers, but not exposed. While functionally correct it resulted
in unnecessary JSON serialization and unneeded computations
---
.../src/main/scala/org/apache/james/jmap/mail/EmailBodyPart.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailBodyPart.scala
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailBodyPart.scala
index 750667014b..0986a84493 100644
---
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailBodyPart.scala
+++
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailBodyPart.scala
@@ -84,7 +84,7 @@ object EmailBodyPart {
EmailBodyPart(partId = PartId.parse("1").get,
blobId = BlobId.of(attachment.getAttachmentId.getId).toOption,
- headers = entity.getHeader.getFields.asScala.toList.map(EmailHeader(_)),
+ headers = List(),
size = Size.sanitizeSize(attachment.getAttachment.getSize),
name = attachment.getName.map(Name(_)).toScala,
`type` = Type(attachment.getAttachment.getType.mimeType().asString()),
@@ -95,7 +95,7 @@ object EmailBodyPart {
location = Option.empty,
subParts = Option.empty,
entity = entity,
- specificHeaders =
EmailHeaders.extractSpecificHeaders(properties)(zoneId, entity.getHeader))
+ specificHeaders = Map())
}
def of(properties: Option[Properties], zoneId: ZoneId, blobId: BlobId,
message: Message): Try[EmailBodyPart] =
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]