Back to Top

DoggCatcher fails to download media when the URL includes encoded [ and ] characters.

3 posts / 0 new
Last post
jonabbey
Offline
Last seen: 8 years 3 months ago
Joined: 08/25/2009 - 15:04
DoggCatcher fails to download media when the URL includes encoded [ and ] characters.

Hi, folks. I'm trying to use GiantBomb.com's premium RSS feed, but DoggCatcher is throwing an exception when it tries to deal with URLs with encoded [ and ] characters.

It appears that DoggCatcher is undoing the URI encoding for the [ and ] characters when parsing the <media:content> or <enclosure> tags, but then is failing to re-do that encoding when it comes time to use the provided URL to access the file.

Here's the log excerpt:

03-26 16:17:18.973 I/DoggCatcher( 2226): DownloadThread::Downloading media file -> /storage/emulated/0/DoggCatcher/EpisodeEnclosures/58/Giant_Bombcast_03_25_2014__5BPremium_5D-03-25-2014-4153733564.mp3.PART [1ms] -> new download
+ [1ms] -> exception: Illegal character in path at index 57: http://v.giantbomb.com/podcast/Giant_Bombcast_03_25_2014_[Premium]-03-25... [328ms] -> unknown - [**335ms**]
03-26 16:17:18.993 I/DoggCatcher( 2226): EventLogAdapter::Application log: Event: Download started with connection type: WIFI
03-26 16:17:18.993 I/DoggCatcher( 2226): Exception:
03-26 16:17:19.213 W/DoggCatcher( 2226): DownloadThread::Exception downloading enclosure /storage/emulated/0/DoggCatcher/EpisodeEnclosures/58/Giant_Bombcast_03_25_2014__5BPremium_5D-03-25-2014-4153733564.mp3.PART
03-26 16:17:19.213 W/DoggCatcher( 2226): java.lang.IllegalArgumentException: Illegal character in path at index 57: http://v.giantbomb.com/podcast/Giant_Bombcast_03_25_2014_[Premium]-03-25...
03-26 16:17:19.213 W/DoggCatcher( 2226): at java.net.URI.create(URI.java:727)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.snoggdoggler.util.UriRepairingRedirectStrategy.createUriWithEncodedQueryString(UriRepairingRedirectStrategy.java:29)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.snoggdoggler.util.UriRepairingRedirectStrategy.createLocationURI(UriRepairingRedirectStrategy.java:17)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:148)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.apache.http.impl.client.DefaultRedirectStrategy.getRedirect(DefaultRedirectStrategy.java:217)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1105)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:548)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.util.http.HTTPFileGetter.getResponse(HTTPFileGetter.java:322)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.util.http.HTTPFileGetter.writeToStream(HTTPFileGetter.java:236)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.doggcatcher.util.http.HTTPFileGetter.writeToStream(HTTPFileGetter.java:188)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.snoggdoggler.android.activity.downloadqueue.DownloadThread.doLoop(DownloadThread.java:135)
03-26 16:17:19.213 W/DoggCatcher( 2226): at com.snoggdoggler.util.LoopingThread.run(LoopingThread.java:60)
03-26 16:17:19.223 W/DoggCatcher( 2226): DownloadThread::Delete enclosure if it is zero bytes: true
03-26 16:17:19.223 I/DoggCatcher( 2226): EventLogAdapter::Application log: Event: Download failure - Giant Bombcast 03/25/2014 [Premium]

The relevant portion of the RSS feed is as follows:

<item>
<title>Giant Bombcast 03/25/2014 [Premium]</title>
<link>http://www.giantbomb.com/podcasts/giant-bombcast-03-25-2014-premium/1600...
<description>We clear away the post-GDC haze to discuss Sony&#039;s virtual reality plans, Metal Gear Solid V: Ground Zeroes, Arrowhead&#039;s new Gauntlet reboot, hot firmware updates, Infamous: Second Son, and another
+batch of profoundly terrible listener mail.</description>
<pubDate>Tue, 25 Mar 2014 16:00:00 PST</pubDate>
<guid isPermaLink="false">1600-810</guid>
<itunes:subtitle xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">We clear away the post-GDC haze to discuss Sony&#039;s virtual reality plans, Metal Gear Solid V: Ground Zeroes, Arrowhead&#039;s new Gauntlet re
+boot, hot firmware updates, Infamous: Second Son, and another batch of profoundly terrible listener mail.</itunes:subtitle>
<itunes:summary>We clear away the post-GDC haze to discuss Sony&#039;s virtual reality plans, Metal Gear Solid V: Ground Zeroes, Arrowhead&#039;s new Gauntlet reboot, hot firmware updates, Infamous: Second Son, and anoth
+er batch of profoundly terrible listener mail.</itunes:summary>
<itunes:author xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">Giant Bomb</itunes:author>
<itunes:explicit xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">yes</itunes:explicit>
<itunes:duration xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">9058</itunes:duration>
<itunes:keywords xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">GiantBomb,Giant Bomb,Jeff Gerstmann,video games,PS3,WiiU,Xbox 360,PC,PSP,DS</itunes:keywords>
<itunes:image href="http://static.giantbomb.com/uploads/original/0/26/2613351-toiletterroris... />
<media:content xmlns:media="http://search.yahoo.com/mrss/" url="http://www.giantbomb.com/podcasts/download/810/Giant_Bombcast_03_25_2014... fileSize="72716244" type="audio/mp
+eg"/>
<enclosure url="http://www.giantbomb.com/podcasts/download/810/Giant_Bombcast_03_25_2014... length="9058" type="audio/mpeg"/>
</item>

buhbuh
Offline
Last seen: 8 years 3 months ago
Joined: 02/03/2013 - 00:07
I too am having the same

I too am having the same problem. Is there a work around for this?

WayneC
Offline
Last seen: 1 week 1 day ago
Joined: 02/23/2011 - 22:28
Giant Bomb feed

See Eric's (Developer) response to this issue with the Giant Bomb feed (Posted thread - Reply to #8) http://www.doggcatcher.com/comment/14493#comment-14493

For other feeds with with [] in the URL or file-name, the bug issue was resolved http://mantis.doggcatcher.com/view.php?id=1887 and the fix should be released this Friday or next