[ 
https://issues.apache.org/jira/browse/CAMEL-19899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17767864#comment-17767864
 ] 

Claus Ibsen commented on CAMEL-19899:
-------------------------------------

Okay I think its worth a try to move that logic, and you are welcome to send PR

> 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
>            Priority: Minor
>
> 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