Claus Ibsen created CAMEL-26503:
-----------------------------------
Summary: 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
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)