зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1719442 - stop doing alternate fixup for 'http' or 'https' strings as host names, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D119391
This commit is contained in:
Родитель
a004c88f02
Коммит
8c639aaff3
|
@ -764,7 +764,9 @@ function maybeSetAlternateFixedURI(info, fixupFlags) {
|
|||
|
||||
let oldHost = uri.host;
|
||||
// Don't create an alternate uri for localhost, because it would be confusing.
|
||||
if (oldHost == "localhost") {
|
||||
// Ditto for 'http' and 'https' as these are frequently the result of typos, e.g.
|
||||
// 'https//foo' (note missing : ).
|
||||
if (oldHost == "localhost" || oldHost == "http" || oldHost == "https") {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -565,6 +565,20 @@ var testcases = [
|
|||
protocolChange: true,
|
||||
affectedByDNSForSingleWordHosts: true,
|
||||
},
|
||||
{
|
||||
input: "http",
|
||||
fixedURI: "http://http/",
|
||||
keywordLookup: true,
|
||||
protocolChange: true,
|
||||
affectedByDNSForSingleWordHosts: true,
|
||||
},
|
||||
{
|
||||
input: "https",
|
||||
fixedURI: "http://https/",
|
||||
keywordLookup: true,
|
||||
protocolChange: true,
|
||||
affectedByDNSForSingleWordHosts: true,
|
||||
},
|
||||
{
|
||||
input: "localhost:8080",
|
||||
fixedURI: "http://localhost:8080/",
|
||||
|
@ -652,7 +666,6 @@ var testcases = [
|
|||
{
|
||||
input: "http//mozilla.org",
|
||||
fixedURI: "http://http//mozilla.org",
|
||||
alternateURI: "https://www.http.com//mozilla.org",
|
||||
keywordLookup: true,
|
||||
protocolChange: true,
|
||||
affectedByDNSForSingleWordHosts: true,
|
||||
|
|
Загрузка…
Ссылка в новой задаче