Bug 606818 - RSS Subscription stuck at "verifying the feed" r=Neil
authoralta88@gmail.com
Tue, 13 Dec 2011 13:38:24 +0000
changeset 9980 b1363ce4fd80c3c62fd4a0841d196c8153da95c6
parent 9979 bcf4d6cb534101be8177ff478d73c0f49e2b6ec2
child 9981 d2d1125046e9fbde6f88996fab68461c6dd0b079
push id336
push userbugzilla@standard8.plus.com
push dateTue, 31 Jan 2012 22:15:45 +0000
treeherdercomm-beta@54945f5d278d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs606818
Bug 606818 - RSS Subscription stuck at "verifying the feed" r=Neil
mailnews/extensions/newsblog/content/FeedItem.js
--- a/mailnews/extensions/newsblog/content/FeedItem.js
+++ b/mailnews/extensions/newsblog/content/FeedItem.js
@@ -83,21 +83,28 @@ FeedItem.prototype =
 
   get url()
   {
     return this.mURL;
   },
 
   set url(aVal)
   {
-    var uri = Components.classes["@mozilla.org/network/standard-url;1"]
-                        .getService(Components.interfaces["nsIStandardURL"]);
-    uri.init(1, 80, aVal, null, null);
-    var uri = uri.QueryInterface(Components.interfaces.nsIURI);
-    this.mURL = uri.spec;
+    try
+    {
+      var ioService = Components.classes["@mozilla.org/network/io-service;1"]
+                                .getService(Components.interfaces.nsIIOService);
+      this.mURL = ioService.newURI(aVal, null, null).spec;
+    }
+    catch(ex)
+    {
+      // The url as published or constructed can be a non url.  It's used as a
+      // feeditem identifier in feeditems.rdf and as a messageId.  Save as is.
+      this.mURL = aVal;
+    }
   },
 
   get date()
   {
     return this.mDate;
   },
 
   set date (aVal)