Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFBB3C51F for ; Mon, 17 Mar 2014 13:41:51 +0000 (UTC) Received: (qmail 10247 invoked by uid 500); 17 Mar 2014 13:41:51 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 9896 invoked by uid 500); 17 Mar 2014 13:41:44 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 9875 invoked by uid 99); 17 Mar 2014 13:41:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 13:41:43 +0000 Date: Mon, 17 Mar 2014 13:41:43 +0000 (UTC) From: "Alan Foster (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-7303) Simple Language - Header access surrounded with quotes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alan Foster updated CAMEL-7303: ------------------------------- Affects Version/s: 2.12.3 > Simple Language - Header access surrounded with quotes > ------------------------------------------------------ > > Key: CAMEL-7303 > URL: https://issues.apache.org/jira/browse/CAMEL-7303 > Project: Camel > Issue Type: Bug > Affects Versions: 2.12.3 > Reporter: Alan Foster > > Quotes within header access are not currently handled in the same way as the inbuilt {{headerAs}} function or the body accessor notation - perhaps these should be aligned? > For instance with the following route > {code:xml} > > > > > hello world > > > ${headers['some key']} > > > > > {code} > Outcome : > {code}[ main] route1 INFO The expression evaluated to :: {code} > Expected : > {code}[ main] route1 INFO The expression evaluated to :: hello world{code} > For reference, the current notation works within other parts of the language and are handled as expected > {code}${body['some key']}{code} > {code}${headerAs('some key', java.lang.Boolean}{code} > I think the fix might be to use {{StringHelper.removeQuotes}} on line #269 within SimpleFunctionExpression.java possibly, such as > {code}remainder = StringHelper.removeQuotes(remainder.substring(1, remainder.length() - 1));{code} -- This message was sent by Atlassian JIRA (v6.2#6252)