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

Claus Ibsen commented on CAMEL-26503:
-------------------------------------

PR: https://github.com/apache/camel/pull/28984

A number, boolean, character or enum reply body is now written as its text, in 
the charset of the response Content-Type, as camel-undertow does. Before, an 
Integer, Long, Short, Float or Double went out as binary bytes, and a boolean, 
character or enum failed with 500. Upgrade guide entry added.

_Claude Code on behalf of Claus Ibsen (davsclaus)_

> camel-platform-http-vertx - a number, boolean or char reply body is sent as 
> binary bytes instead of text
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26503
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-platform-http-vertx
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> When the reply body is a number (Integer, Long, Double, ...), a Boolean or a 
> Character, VertxPlatformHttpSupport.writeResponse does not handle it as text. 
> writeResponseAsFallback finds no InputStream converter and falls back to 
> ByteBuffer, and NIOConverter.toByteBuffer(Integer) writes the 4 raw bytes of 
> the int. So a route that ends with setBody(constant(42)) replies with binary 
> data, not the text 42.
> camel-undertow sends such replies as text since CAMEL-26140 (PR #28910), and 
> camel-http does the same, so platform-http-vertx should write them as text as 
> well.
> _Claude Code on behalf of Claus Ibsen (davsclaus)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to