This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch fix/as2-issues
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b2ef1929890d6b372b1c0d1b650a7cc978056ab6
Author: Guillaume Nodet <[email protected]>
AuthorDate: Mon Mar 9 11:04:57 2026 +0100

    CAMEL-23072: Handle Expect 100-continue on AS2 server side
    
    Wrap the request handler with BasicHttpServerExpectationDecorator in
    AS2ServerConnection. This properly handles clients sending
    Expect: 100-continue by responding with 100 Continue before the client
    transmits the request body.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../org/apache/camel/component/as2/api/AS2ServerConnection.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
index baf8178ba81a..7a700e01121a 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
@@ -53,6 +53,7 @@ import org.apache.hc.core5.http.impl.routing.RequestRouter;
 import org.apache.hc.core5.http.io.HttpRequestHandler;
 import org.apache.hc.core5.http.io.HttpServerConnection;
 import org.apache.hc.core5.http.io.HttpServerRequestHandler;
+import org.apache.hc.core5.http.io.support.BasicHttpServerExpectationDecorator;
 import org.apache.hc.core5.http.io.support.BasicHttpServerRequestHandler;
 import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.hc.core5.http.protocol.HttpCoreContext;
@@ -401,8 +402,10 @@ public class AS2ServerConnection {
             // Create initial empty router
             currentHandler = createHandler();
 
-            // Set up the HTTP service with delegating handler
-            httpService = new HttpService(inhttpproc, new 
DelegatingRequestHandler());
+            // Set up the HTTP service with delegating handler, wrapped to 
support Expect: 100-continue
+            httpService = new HttpService(
+                    inhttpproc,
+                    new BasicHttpServerExpectationDecorator(new 
DelegatingRequestHandler()));
         }
 
         private HttpServerRequestHandler createHandler() {

Reply via email to