[
https://issues.apache.org/jira/browse/CAMEL-19568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Otavio Rodolfo Piske resolved CAMEL-19568.
------------------------------------------
Fix Version/s: 4.0-RC2
4.0.0
Resolution: Fixed
This issue should be resolved with the linked PR. If it persists, please reopen
the ticket and let us know. Thanks for your contribution reporting this issue!
> camel-mail - HTTP/2 Multipart boundary
> --------------------------------------
>
> Key: CAMEL-19568
> URL: https://issues.apache.org/jira/browse/CAMEL-19568
> Project: Camel
> Issue Type: Bug
> Components: camel-mail
> Affects Versions: 4.0-M3
> Reporter: Ruben Romero Montes
> Assignee: Otavio Rodolfo Piske
> Priority: Minor
> Fix For: 4.0-RC2, 4.0.0
>
>
> When using multipart/mixed responses a basic java.net.HttpClient fails to
> process the response because it defaults to HTTP/2.
> {code:java}
> Exception in thread "main" java.io.IOException: protocol error:
> java.io.IOException: Bad header value 'multipart/mixed;
> boundary="----=_Part_0_1089205692.1688375583933"'
> at
> java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:909)
> at
> java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
> at com.example.App.main(App.java:22)
> Caused by: java.io.IOException: protocol error: java.io.IOException: Bad
> header value 'multipart/mixed;
> boundary="----=_Part_0_1089205692.1688375583933"'
> at
> java.net.http/jdk.internal.net.http.Http2Connection.protocolError(Http2Connection.java:1089)
> at
> java.net.http/jdk.internal.net.http.Http2Connection.processFrame(Http2Connection.java:868)
> at
> java.net.http/jdk.internal.net.http.frame.FramesDecoder.decode(FramesDecoder.java:155)
> at
> java.net.http/jdk.internal.net.http.Http2Connection$FramesController.processReceivedData(Http2Connection.java:265)
> at
> java.net.http/jdk.internal.net.http.Http2Connection.asyncReceive(Http2Connection.java:714)
> at
> java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.processQueue(Http2Connection.java:1440)
> at
> java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205)
> at
> java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
> at
> java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
> at java.base/java.lang.Thread.run(Thread.java:1623)
> {code}
> When using HTTP/1.1 this is not an issue.
> It seems the main difference is the format of the Content-Type header.
> {code}
> Content-Type: multipart/mixed;
> boundary="----=_Part_0_644068325.1688368219924"
> {code}
> When the removing the extra CRLF and tabs from the header, the client
> processes the response successfully.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)