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 A739218A8A for ; Thu, 30 Apr 2015 06:18:06 +0000 (UTC) Received: (qmail 50354 invoked by uid 500); 30 Apr 2015 06:18:06 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 50313 invoked by uid 500); 30 Apr 2015 06:18:06 -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 50303 invoked by uid 99); 30 Apr 2015 06:18:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 06:18:06 +0000 Date: Thu, 30 Apr 2015 06:18:06 +0000 (UTC) From: "Willem Jiang (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-8518) Lack of url encoding of square braces [] in camel http component causes URISyntaxException 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-8518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved CAMEL-8518. --------------------------------- Resolution: Won't Fix > Lack of url encoding of square braces [] in camel http component causes URISyntaxException > ------------------------------------------------------------------------------------------ > > Key: CAMEL-8518 > URL: https://issues.apache.org/jira/browse/CAMEL-8518 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.14.1 > Reporter: Edward Welch > Assignee: Willem Jiang > > I'm using camel as an HTTP proxy server for Kibana, when creating a new index in kibana, it uses a url that contains square braces: > http://localhost:5601/elasticsearch/.kibana/index-pattern/[logstash-]YYYY.MM.DD > This leads to a java.net.URISyntaxException in the HttpHelper class createURI method, on the first line where it tries to instantiate a URI. > I believe this may easily be fixed by adding square braces to the list of chars which need encoding in the UnsafeUriCharactersEncoder.encodeHttpURI method. This method is being called on line 215 of the HttpHelper class earlier in the processing. > Adding '[' and ']' to the static unsafeCharactersHttp initializer should cause those characters to be encoded and prevent this exception. > I see there is an unsafeCharactersRfc1738 set, which includes square braces, perhaps this could be used instead? I'm not sure the reason there are separate characters lists in this class. > Thanks, > Ed -- This message was sent by Atlassian JIRA (v6.3.4#6332)