Closed
Bug 307686
Opened 19 years ago
Closed 7 years ago
jssubscript-loader does not want to load script that are not local
Categories
(Core :: XPConnect, enhancement)
Core
XPConnect
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: tom.germeau, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-BE; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-BE; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 (ax)
when you load a script from http:// with jssubscript-loader it returns an
exception: "ContentLength not available (not a local URL?)"
Reproducible: Always
Steps to Reproduce:
var scriptinc =
Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService()
.QueryInterface(Components.interfaces.mozIJSSubScriptLoader);
scriptinc.loadSubScript("http://foo.com/script.js");
Actual Results:
Exception
Expected Results:
script.js should be loaded
Comment 2•19 years ago
|
||
The problem is that the subscript loader does sync loads, and those don't really work for non-local stuff very well. The loader _could_ not bother with the content-length and just read data till it gets no more, though... Would that make more sense?
Updated•18 years ago
|
Assignee: dbradley → nobody
Updated•18 years ago
|
QA Contact: pschwartau → xpconnect
Comment 3•17 years ago
|
||
Note that mozIJSSubScriptLoader.idl <http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/idl/mozIJSSubScriptLoader.idl>, a frozen interface, says explicitly that it will only load local URLs:
54 * @param url the url if the sub-script, it MUST be either a file:,
55 * resource:, or chrome: url, and MUST be local.
So this seems like an enhancement that will require a mozIJSSubScriptLoader2 interface.
Severity: normal → enhancement
Comment 4•7 years ago
|
||
Loading remote scripts in the subscript loader sounds like a bad idea.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•