Loading docshell/base/URIFixup.jsm +3 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading docshell/test/unit/test_URIFixup_info.js +14 −1 Original line number Diff line number Diff line Loading @@ -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/", Loading Loading @@ -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, Loading Loading
docshell/base/URIFixup.jsm +3 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading
docshell/test/unit/test_URIFixup_info.js +14 −1 Original line number Diff line number Diff line Loading @@ -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/", Loading Loading @@ -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, Loading