This is an automated email from the ASF dual-hosted git repository.
chibenwa pushed a commit to branch 3.9.x
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/3.9.x by this push:
new da8f0a7e71 [FIX] Prevent potentially blocking calls upon uploads
(#3116) - backport 3.9.x
da8f0a7e71 is described below
commit da8f0a7e71a1be8859e7256c5f2b12ee4e62b315
Author: Benoit TELLIER <[email protected]>
AuthorDate: Mon Aug 17 14:04:59 2026 +0700
[FIX] Prevent potentially blocking calls upon uploads (#3116) - backport
3.9.x
---
.../src/main/scala/org/apache/james/jmap/routes/UploadRoutes.scala | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/routes/UploadRoutes.scala
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/routes/UploadRoutes.scala
index 1d3a458351..c21862cdf6 100644
---
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/routes/UploadRoutes.scala
+++
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/routes/UploadRoutes.scala
@@ -129,6 +129,8 @@ class UploadRoutes @Inject()(@Named(InjectionKeys.RFC_8621)
val authenticator: A
.asByteArray()
.map(array => ByteBuffer.wrap(array))))
.flatMap(content => handle(targetAccountId, contentType, content,
session, response))
+ // Reading that Flux[ByteBuffer] backed InputStream blocks, and
authentication may well have completed on a non blocking thread
+ .subscribeOn(ReactorUtils.BLOCKING_CALL_WRAPPER)
def handle(accountId: AccountId, contentType: ContentType, content:
InputStream, mailboxSession: MailboxSession, response: HttpServerResponse):
SMono[Void] = {
val maxSize: Long = configuration.maxUploadSize.value.value
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]