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),
_forceTrailingSlash: function(aURL) {
// Some devices add the trailing '/' and some don't. Let's make sure
// it's there for consistency.
if (!aURL.endsWith("/")) {
aURL += "/";
}
// Cleanup the URL to make it consistent across devices
try {
aURL = Services.io.newURI(aURL, null, null).spec;
} catch(e) {}
return aURL;
},