зеркало из https://github.com/mozilla/gecko-dev.git
bug 1006494 - SimpleServiceDiscovery shouldn't add a trailing slash to services' location r=mfinkle
This commit is contained in:
Родитель
cfdaa8975b
Коммит
8fe67c95cb
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче