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 8BF3418A05 for ; Thu, 11 Feb 2016 11:12:18 +0000 (UTC) Received: (qmail 95302 invoked by uid 500); 11 Feb 2016 11:12:18 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 95267 invoked by uid 500); 11 Feb 2016 11:12:18 -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 95203 invoked by uid 99); 11 Feb 2016 11:12:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2016 11:12:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 198CB2C0AFA for ; Thu, 11 Feb 2016 11:12:18 +0000 (UTC) Date: Thu, 11 Feb 2016 11:12:18 +0000 (UTC) From: =?utf-8?Q?Bj=C3=B6rn_Paulsen_=28JIRA=29?= To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-9590) Camel decode URI wrong MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-9590?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Bj=C3=B6rn Paulsen updated CAMEL-9590: --------------------------------- Description:=20 When using a plus sign "+" in the URI, camel translate the URI wrong. Same = Problem when encode the URI first. Here is a Example: public class defaultRoutes extends RouteBuilder { =09public void configure() throws UnsupportedEncodingException { =09=09String url =3D "plus +wrong"; =09=09System.err.println("URL before: " + url); // Output plus +wrong =09=09String encodedUrl =3D URLEncoder.encode(url, "UTF-8"); =09=09System.err.println("URL after encoding: " + encodedUrl); // Outpu= t plus+%2Bwrong <- This is right =09=09// In Route it calls the URL http4://www.google.de/webhp?q=3Dplus= ++ =09=09// and not http4://www.google.de/webhp?q=3Dplus+%2bwrong =09=09from("timer://foo?fixedRate=3Dtrue&period=3D10000") =09=09=09.to("http4://www.google.de/webhp?q=3D"+encodedUrl) =09=09=09.to("activemq:testPlus"); =09} } To see the wrong Url, put the Log Level to INFO was: When using a plus sign "+" in the URI, camel translate the URI wrong. Same = Problem when encode the URI first. Here is a Example: public class defaultRoutes extends RouteBuilder { =09public void configure() throws UnsupportedEncodingException { =09=09String url =3D "plus +wrong"; =09=09System.err.println("URL before: " + url); // Output plus +wrong =09=09String encodedUrl =3D URLEncoder.encode(url, "UTF-8"); =09=09System.err.println("URL after encoding: " + encodedUrl); // Outpu= t plus+%2Bwrong <- This is right =09 =09=09// In Route it calls the URL http4://www.google.de/webhp?q=3Dplus= ++ =09=09// and not http4://www.google.de/webhp?q=3Dplus+%2bwrong =09=09from("timer://foo?fixedRate=3Dtrue&period=3D10000") =09=09=09.to("http4://www.google.de/webhp?q=3D"+encodedUrl) =09=09=09.to("activemq:testPlus"); =09} } To see the wrong Url, put the Log Level to INFO > Camel decode URI wrong > ---------------------- > > Key: CAMEL-9590 > URL: https://issues.apache.org/jira/browse/CAMEL-9590 > Project: Camel > Issue Type: Bug > Components: camel-http4 > Affects Versions: 2.15.5, 2.16.2 > Environment: Windows 10, Eclipse > Reporter: Bj=C3=B6rn Paulsen > > When using a plus sign "+" in the URI, camel translate the URI wrong. Sam= e Problem when encode the URI first. > Here is a Example: > public class defaultRoutes extends RouteBuilder { > =09public void configure() throws UnsupportedEncodingException { > =09=09String url =3D "plus +wrong"; > =09=09System.err.println("URL before: " + url); // Output plus +wrong > =09=09String encodedUrl =3D URLEncoder.encode(url, "UTF-8"); > =09=09System.err.println("URL after encoding: " + encodedUrl); // Out= put plus+%2Bwrong <- This is right > =09=09// In Route it calls the URL http4://www.google.de/webhp?q=3Dpl= us++ > =09=09// and not http4://www.google.de/webhp?q=3Dplus+%2bwrong > =09=09from("timer://foo?fixedRate=3Dtrue&period=3D10000") > =09=09=09.to("http4://www.google.de/webhp?q=3D"+encodedUrl) > =09=09=09.to("activemq:testPlus"); > =09} > } > To see the wrong Url, put the Log Level to INFO -- This message was sent by Atlassian JIRA (v6.3.4#6332)