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 3AA85E125 for ; Mon, 18 Mar 2013 18:16:16 +0000 (UTC) Received: (qmail 54131 invoked by uid 500); 18 Mar 2013 18:16:16 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 54066 invoked by uid 500); 18 Mar 2013 18:16:16 -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 53985 invoked by uid 99); 18 Mar 2013 18:16:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 18:16:16 +0000 Date: Mon, 18 Mar 2013 18:16:15 +0000 (UTC) From: "Daniel Goering (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-6176) Camel 2.10.1 incapable of working with + in endpoint URIs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Daniel Goering created CAMEL-6176: ------------------------------------- Summary: Camel 2.10.1 incapable of working with + in endpoint URIs Key: CAMEL-6176 URL: https://issues.apache.org/jira/browse/CAMEL-6176 Project: Camel Issue Type: Bug Components: camel-core Affects Versions: 2.9.0 Environment: Mac 10.7 Java 1.6.0_29 Reporter: Daniel Goering Assignee: Hadrian Zbarcea Priority: Critical Fix For: 2.9.1, 2.10.0 In the class org.apache.camel.util.URISupport which will be used to resolve endpoints (DefaultCamelContext#normalizeEndpointUri) the method parseParameters will be called. At first the java.net.Uri#getQuery will be called with according to the javadoc "Returns the decoded query component of this URI" returns a decoded URI. If that fails the java.net.Uri#getSchemeSpecificPart method will be called which according to the javadoc "Returns the decoded scheme-specific part of this URI." returns a decoded URI. So to summarize we get in any case a decoded URI. This URI will then be than in the method org.apache.camel.util.URISupport#parseQuery(String) again decoded with java.net.URLDecoder#decode(String,String). This code leads to the following behaviour: If a % is properly encoded with %25test the %25test will be substituted by the first call to %test and the decoded again which leads to an Exception. In the http://svn.apache.org/viewvc?view=revision&revision=1166508 commit you can see that the % was uncommented from org.apache.camel.util#UnsafeUriCharactersEncoder. Maybe this is related. However... Double encoding of URIs seems quite odd. With any URI char there is no issue with that. But with % the % will be decoded again, which makes a % unusable in Camel. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira