Closed
Bug 230345
Opened 21 years ago
Closed 21 years ago
Mozilla should not attempt to parse 404 pages as JavaScript
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: tthurman, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031109 Firebird/0.7+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031109 Firebird/0.7+
When a page includes external JavaScript, Mozilla should only attempt to parse
that JavaScript if the page referenced actually exists, rather than trying to
parse the HTML that servers typically produce for 404 pages.
Reproducible: Always
Steps to Reproduce:
1. Go to <http://marnanel.publication.org.uk/includebug/includebug.html>. This
page attempts to load
<http://marnanel.publication.org.uk/includebug/does-not-exist.js>, which does
not exist.
2. Check JS console.
Actual Results:
As shown in the JS console, Mozilla has attempted to parse the error page as
JavaScript:
Error: syntax error
Source File: http://marnanel.publication.org.uk/includebug/does-not-exist.js
Line: 1
Source Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Expected Results:
Mozilla should either have ignored the missing page, or reported the fact that
it was missing as an error.
Comment 1•21 years ago
|
||
Confirming on Windows too.
I see 2 issues here:
1. Mozilla tries to parse text/html as JavaScript.
1.1 HTTP supplied Content-type type does not override HTML supplied type?
2. Mozilla tries to parse JavaScript file despite 404 reply.
The first behaviour is arguable, as there is no standardised JavaScript MIME type.
The second is also arguable, as a site might have a default 404 JS replacement
for it's missing JS files.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Summary: Mozilla should not attempt to parse JavaScript files which 404 → Mozilla should not attempt to parse 404 pages as JavaScript
Comment 2•21 years ago
|
||
Reporter:
Please retry it with a recent build or mark it worksforme
"Gecko/20031109" is to old to report bugs.
This is wfm with Mozilla win2k build 20040107..
Reporter | ||
Comment 3•21 years ago
|
||
WFM with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20040108
Firebird/0.7+. Closing. Sorry about that.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Comment 4•21 years ago
|
||
verified
( I think I saw a bug fix about this but I couldn't find it...)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•