Closed
Bug 223108
Opened 21 years ago
Closed 21 years ago
Syntax error when loading non-existant external javascript file.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: nathanc, Assigned: keeda)
Details
Attachments
(1 file)
1.20 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
With the following code:
<script type="text/javascript" src="/javascript/validation.js"></script>
<script type="text/javascript" src="/javascript/validation_en_US.js"></script>
The "/javascript/validation_en_US.js" file does not exist on the server.
The response sent back is the standard Apache 404 message:
HTTP/1.1 404 Not Found
Date: Tue, 21 Oct 2003 16:30:24 GMT
Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_jk/1.2.0 mod_gzip/1.3.19.1a
mod_ssl/2.8.5 OpenSSL/0.9.6
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
134
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /javascript/validation_en_US.js was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.19 Server at dev4.morinda.com Port 80</ADDRESS>
</BODY></HTML>
0
However the Javascript engine tries to interpret the repsonse regardless of the
HTTP status code, giving a Syntax Error in the Javascript Console:
Error: syntax error
Source File: http://dev4.morinda.com/javascript/validation_en_US.js
Line: 1
Source Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Reproducible: Always
Steps to Reproduce:
Expected Results:
Mozilla should not have tried to interpret a Javascript file that is Not Found
(404).
This also affects Mozilla 1.5 for Linux.
Comment 1•21 years ago
|
||
We have to reassign this to a browser component. Once the browser
hands script to the JavaScript Engine to interpret, it must raise
and error on variables that are undefined.
Reassigning to Browser-General for more exposure and further triage.
I'm not sure what the proper response of Mozilla should be here.
What does IE do in the same situation?
Assignee: rogerl → general
Component: JavaScript Engine → Browser-General
QA Contact: PhilSchwartau → general
IE does not give an error message. But Since IE does not have a Javascript
console, you can't tell what warnings it gives either.
Confirmed on Win2000, 20031021 build of Firebird. Using IIS 5.0 on my local
machine produces a similar error message in the console which is definitely
misleading. MSIE gives no warning or error of any kind. Could not find a dupe.
Sending to DOM Level 0, although perhaps JS Console should get this, I'm not
sure if it's a case of the wrong error being generated or the console
interpreting the error incorrectly.
Assignee: general → general
Status: UNCONFIRMED → NEW
Component: Browser-General → DOM Level 0
Ever confirmed: true
QA Contact: general → ian
Assignee | ||
Comment 4•21 years ago
|
||
Did bug 139040 regress?
![]() |
||
Comment 5•21 years ago
|
||
Could someone make a public testcase? The code for bug 139040 is still there
and looking happy....
Assignee | ||
Comment 6•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #133915 -
Flags: superreview?(bzbarsky)
Attachment #133915 -
Flags: review?(bugmail)
![]() |
||
Comment 8•21 years ago
|
||
Comment on attachment 133915 [details] [diff] [review]
This seems to be what was intended :-)
Doh... I suck. Just land this, please. ;)
Attachment #133915 -
Flags: superreview?(bzbarsky)
Attachment #133915 -
Flags: superreview+
Attachment #133915 -
Flags: review?(bugmail)
Attachment #133915 -
Flags: review+
Assignee | ||
Comment 9•21 years ago
|
||
Checked in. (Sorry that it took me a while to get around to doing that.)
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•