You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ralf Steppacher (JIRA)" <ji...@apache.org> on 2013/11/11 11:16:17 UTC
[jira] [Commented] (CAMEL-6953) Camel Simple expression
"${headers.CamelHttpUrl} contains 'foo'" never becomes true
[ https://issues.apache.org/jira/browse/CAMEL-6953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818824#comment-13818824 ]
Ralf Steppacher commented on CAMEL-6953:
----------------------------------------
Starting the attached context and browsing to "localhost:9191/headerbug/foo" will result in log output "No match in URL."
> Camel Simple expression "${headers.CamelHttpUrl} contains 'foo'" never becomes true
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-6953
> URL: https://issues.apache.org/jira/browse/CAMEL-6953
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-jetty
> Affects Versions: 2.10.5, 2.11.2, 2.12.1
> Reporter: Ralf Steppacher
> Attachments: jetty-CamelHttpUrl-context.xml
>
>
> The exchange header CamelHttpUrl is of type StringBuffer and not String. This causes the simple expression "${headers.CamelHttpUrl} contains 'foo'" to always evaluate to false, because org.apache.camel.util.ObjectHelper::contains(Object,Object) does not handle StringBuffer.
> Either the header should be of type String or org.apache.camel.util.ObjectHelper::contains(Object,Object) should deal with StringBuffer arguments.
--
This message was sent by Atlassian JIRA
(v6.1#6144)