diff --git a/src/ContentGrabber/grabber.vala b/src/ContentGrabber/grabber.vala index 594dd147..76af4c35 100644 --- a/src/ContentGrabber/grabber.vala +++ b/src/ContentGrabber/grabber.vala @@ -105,9 +105,9 @@ public class FeedReader.Grabber : GLib.Object { { Logger.debug("Grabber: process article: " + m_articleURL); - var uri = new Soup.URI(m_articleURL); - if(uri == null) - { + try { + var uri = GLib.Uri.parse(m_articleURL, GLib.UriFlags.NONE); + } catch (GLib.UriError e) { Logger.error("No valid article-url?!?"); return false; } @@ -229,7 +229,7 @@ public class FeedReader.Grabber : GLib.Object { if(msg.status_code == Soup.Status.MOVED_TEMPORARILY || msg.status_code == Soup.Status.MOVED_PERMANENTLY) { - m_articleURL = msg.uri.to_string(false); + m_articleURL = msg.uri.to_string(); m_article.setURL(m_articleURL); Logger.debug("Grabber: new url is: " + m_articleURL); } diff --git a/src/FavIcon.vala b/src/FavIcon.vala index fcf730c9..25d29ace 100644 --- a/src/FavIcon.vala +++ b/src/FavIcon.vala @@ -288,7 +288,13 @@ public class FeedReader.FavIcon : GLib.Object } // try domainname/favicon.ico - var uri = new Soup.URI(m_feed.getURL()); + GLib.Uri uri; + try { + uri = GLib.Uri.parse(m_feed.getURL(), GLib.UriFlags.NONE); + } catch (GLib.UriError e) { + Logger.error(@"Fetching favicon failed: can't parse url $(m_feed.getURL())! Seems to be not valid."); + } + string? siteURL = null; if(uri != null) { diff --git a/src/Utils.vala b/src/Utils.vala index c821c2e1..c4870575 100644 --- a/src/Utils.vala +++ b/src/Utils.vala @@ -263,10 +263,10 @@ public class FeedReader.Utils : GLib.Object { public static bool ping(string link) { Logger.debug("Ping: " + link); - var uri = new Soup.URI(link); - - if(uri == null) - { + GLib.Uri uri; + try { + uri = GLib.Uri.parse(link, GLib.UriFlags.NONE); + } catch (GLib.UriError e) { Logger.error(@"Ping failed: can't parse url $link! Seems to be not valid."); return false; }