[ 
https://issues.apache.org/jira/browse/CAMEL-19899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Netherton resolved CAMEL-19899.
-------------------------------------
    Fix Version/s: 4.1.0
         Assignee: James Netherton
       Resolution: Fixed

> camel-servlet: Multipart attachment processing does not work on Undertow
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-19899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19899
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-servlet
>            Reporter: James Netherton
>            Assignee: James Netherton
>            Priority: Minor
>             Fix For: 4.1.0
>
>
> Something I observed with camel-servlet on Camel Quarkus. Undertow provides 
> the Servlet support and the way that it's implementation of multipart 
> attachment parsing works, assumes that the request body has not been read 
> yet. Otherwise it will not attempt to process attachments.
> In DefaultHttpBinding.readyBody. The body is read first:
> https://github.com/apache/camel/blob/2509b469b5acfc46861643d01f0495133b690ddb/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java#L203
> And then attachments processed at the end:
> https://github.com/apache/camel/blob/2509b469b5acfc46861643d01f0495133b690ddb/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpBinding.java#L230
> I tested moving attachment processing to the beginning and it made my test 
> case work successfully.
> Not sure if that change could potentially screw things up non-undertow 
> servlet containers?
> This same issue is probably present on Spring Boot with Undertow. I've not 
> checked.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to