bug 1006494 - SimpleServiceDiscovery shouldn't add a trailing slash to services' location r=mfinkle

This commit is contained in:
Brad Lassey 2014-05-06 14:40:05 -04:00
Родитель cfdaa8975b
Коммит 8fe67c95cb
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -57,11 +57,10 @@ var SimpleServiceDiscovery = {
_searchRepeat: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer), _searchRepeat: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
_forceTrailingSlash: function(aURL) { _forceTrailingSlash: function(aURL) {
// Some devices add the trailing '/' and some don't. Let's make sure // Cleanup the URL to make it consistent across devices
// it's there for consistency. try {
if (!aURL.endsWith("/")) { aURL = Services.io.newURI(aURL, null, null).spec;
aURL += "/"; } catch(e) {}
}
return aURL; return aURL;
}, },