Bug 773884 - Remove special "index.html" path mapping support for app:// scheme [r=bsmith]

This commit is contained in:
Antonio Manuel Amaya Calvo 2012-08-29 05:29:18 -07:00
parent db296f5a65
commit 7a04f673d1

View File

@ -59,16 +59,6 @@ AppProtocolHandler.prototype = {
appId = noScheme.substring(0, firstSlash);
}
// Simulates default behavior of http servers:
// Adds index.html if the file spec ends in / in /#anchor
let lastSlash = fileSpec.lastIndexOf("/");
if (lastSlash == fileSpec.length - 1) {
fileSpec += "index.html";
} else if (fileSpec[lastSlash + 1] == '#') {
let anchor = fileSpec.substring(lastSlash + 1);
fileSpec = fileSpec.substring(0, lastSlash) + "/index.html" + anchor;
}
// Build a jar channel and masquerade as an app:// URI.
let uri = "jar:file://" + this.basePath + appId + "/application.zip!" + fileSpec;
let channel = Services.io.newChannel(uri, null, null);