Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A1B29A21 for ; Fri, 16 Mar 2012 17:40:52 +0000 (UTC) Received: (qmail 21293 invoked by uid 500); 16 Mar 2012 17:40:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 21264 invoked by uid 500); 16 Mar 2012 17:40:51 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 21255 invoked by uid 99); 16 Mar 2012 17:40:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 17:40:51 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of olivierursushorribilis@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 17:40:46 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1S8b8c-0003H4-BS for users@camel.apache.org; Fri, 16 Mar 2012 10:40:26 -0700 Date: Fri, 16 Mar 2012 10:40:26 -0700 (PDT) From: olivierursushorribilis To: users@camel.apache.org Message-ID: <1331919626349-5572015.post@n5.nabble.com> Subject: Camel RSS Component and ? char in URL feed MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, my RSS feed URL is : http://unevieagrimper.blogspot.com/feeds/posts/default?alt=rss To me, this URL is quite valid : many RSS feed (thousands !) are using such URL suffix (?xx=xx). When i try to use Camel RSS Component i get an error : rss:http://unevieagrimper.blogspot.com/feeds/posts/default?alt=rss?splitEntries=false&consumer.delay=1000 Since ? is a special char for camel URI it causes trouble. Then, i tried : rss:http://unevieagrimper.blogspot.com/feeds/posts/default%3Falt=rss?splitEntries=false&consumer.delay=1000 But, it does not work since %3F is not decoded when Camel RSS tries to get data from this URL. What is the proper way to get Camel RSS working with this URL ? I've patched (quick and dirty for testing purpose) the org.apache.camel.component.rss.RssUtils class : package org.apache.camel.component.rss; import java.io.InputStream; import java.net.URL; import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.io.SyndFeedInput; import com.sun.syndication.io.XmlReader; public final class RssUtils { private RssUtils() { // Helper class } public static SyndFeed createFeed(String feedUri) throws Exception { String uri = feedUri; if(feedUri.contains("%3F")){ uri = feedUri.replace("%3F","?"); } InputStream in = new URL(uri).openStream(); SyndFeedInput input = new SyndFeedInput(); return input.build(new XmlReader(in)); } } The patch handle the encoded %3F. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RSS-Component-and-char-in-URL-feed-tp5572015p5572015.html Sent from the Camel - Users mailing list archive at Nabble.com.