Claus Ibsen created CAMEL-27906:
-----------------------------------
Summary: camel-platform-http: httpMethodRestrict with a trailing
space or an empty value fails
Key: CAMEL-27906
URL: https://issues.apache.org/jira/browse/CAMEL-27906
Project: Camel
Issue Type: Bug
Components: camel-platform-http
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-platform-http for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31165).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. httpMethodRestrict with a trailing space or an empty value fails
{{Method.parseList}} does not trim a list with one entry, so
httpMethodRestrict="GET " throws IllegalArgumentException from Method.valueOf;
an empty value splits into [""] and fails the same way.
Proposed change: trim every token, skip empty ones, and return all methods when
none is left.
h4. 2. Smaller issues
PlatformHttpConsole and PlatformHttpEndpoint.getServiceUrl always report
http://0.0.0.0[:port], also when the server uses TLS. With the Vert.x engine, a
multipart/form-data request with useStreaming=true fails through ctx.fail with
500 instead of a 4xx. The cookie* options have no label while useCookieHandler
and cookieConfiguration are advanced,consumer.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)