From 7a04f673d1ed47ad6143e34d97c89ca789fedbd3 Mon Sep 17 00:00:00 2001 From: Antonio Manuel Amaya Calvo Date: Wed, 29 Aug 2012 05:29:18 -0700 Subject: [PATCH] Bug 773884 - Remove special "index.html" path mapping support for app:// scheme [r=bsmith] --- netwerk/protocol/app/AppProtocolHandler.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/netwerk/protocol/app/AppProtocolHandler.js b/netwerk/protocol/app/AppProtocolHandler.js index c0d8b8e8b7a..fe6cbe15dd4 100644 --- a/netwerk/protocol/app/AppProtocolHandler.js +++ b/netwerk/protocol/app/AppProtocolHandler.js @@ -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);