chibenwa commented on code in PR #2005:
URL: https://github.com/apache/james-project/pull/2005#discussion_r1492674543


##########
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/Email.scala:
##########
@@ -610,7 +610,7 @@ private class EmailFullViewFactory 
@Inject()(zoneIdProvider: ZoneIdProvider, pre
         .getOrElse(Failure(new IllegalArgumentException("No message 
supplied")))
       mime4JMessage <- Email.parseAsMime4JMessage(firstMessage)
       blobId <- BlobId.of(messageId)
-      bodyStructure <- EmailBodyPart.ofMessage(request.bodyProperties, 
zoneIdProvider.get(), blobId, mime4JMessage, firstMessage.getSize)
+      bodyStructure <- EmailBodyPart.ofMessage(request.bodyProperties, 
zoneIdProvider.get(), blobId, mime4JMessage, firstMessage.getBody.size)

Review Comment:
   Quite likely.
   
   However that's the size of the message as stored in the mailbox.
   
   I suggest downloading the EML and checking the size and validating which on 
it the right one...
   
   It is not impossible the the MessageWriter does some sanitizing like adding 
a trailing CRLF if missing...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to