Closed
Bug 82187
Opened 24 years ago
Closed 8 years ago
subscript loader can't load from a jar
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
INCOMPLETE
mozilla1.0.1
People
(Reporter: rginda, Unassigned)
References
Details
Attachments
(1 file)
680 bytes,
text/plain
|
Details |
The contentLength attribute of nsIChannel returns a failure code when the
channel represents a file:// url that is part of a jar. This keeps users from
loading subscripts stored in a jar, which makes the loader kind-of useless.
Mitch, do you know why we can't get the content length of a file in a jar?
The code that's failing is
http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/loader/mozJSSubScriptLoader.cpp#275
Reporter | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla1.0
Comment 1•24 years ago
|
||
Rob, this might be a bug with GetContentLength because GetContentType seems to
work fine from a jar'd file.
char *type;
chan->GetContentType(&type);
printf("content type %s\n\n", type);
prints out:
content type application/x-javascript
--pete
Comment 2•24 years ago
|
||
dunno...you should be able to get the content length. Maybe recent Necko changes
messed this up. How do I reproduce this?
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
To reproduce, take the js code in attachment 35791 [details] and paste it into
navigator.xul in place of:
<script type="application/x-javascript"
src="chrome://navigator/content/navigator.js"/>
zip it up into a jar and run mozilla.
You should see this error when you load it up.
Note: verifyreflow is disabled
Note: styleverifytree is disabled
Note: frameverifytree is disabled
JavaScript error:
line 0: uncaught exception: ContentLength not available (not a local URL?)
--pete
Comment 5•24 years ago
|
||
If i dereference nsIURI from non jar'd package i produce this output:
js url=chrome://rubbertree/content/js/globals.js
uri->GetSpec=file:///usr/src/MOZILLA/mozilla/dist/bin/chrome/rubbertree/content/js/globals.js
uri->GetPath=/usr/src/MOZILLA/mozilla/dist/bin/chrome/rubbertree/content/js/globals.js
uri->Resolve=file:///usr/src/MOZILLA/mozilla/dist/bin/chrome/rubbertree/content/js/globals.js
uri->GetPrePath=file://
chan->GetContentType=application/x-javascript
From jar'd package my output is this:
js url=chrome://rubbertree/content/js/globals.js
uri->GetSpec=jar:resource:///chrome/rubbertree.jar!/content/js/globals.js
uri->GetPath=
uri->Resolve=jar:resource:///chrome/rubbertree.jar!/content/js/
uri->GetPrePath=jar:
chan->GetContentType=application/x-javascript
globals.js is the first js file i'm loading in this test case.
--pete
Comment 6•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Updated•19 years ago
|
QA Contact: pschwartau → xpconnect
Reporter | ||
Updated•17 years ago
|
Assignee: rginda → nobody
Status: ASSIGNED → NEW
Comment 8•17 years ago
|
||
Is there any plans regarding fixing this bug ??
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•