Closed
Bug 518301
Opened 15 years ago
Closed 11 years ago
"not well-formed" error when loading non-XML local file with XMLHTTPRequest
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 384298
People
(Reporter: marcus, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux; sv-SE) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) konqueror/4.3.1 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090910 Iceweasel/3.5.3 (Debian-3.5.3-1) Whenever a local file is loaded from a file:// URL with XHR, the error console shows a "not well-formed" error. This happens for all files regardless of content and file name extension, so also for files that have nothing to do with XML. The fact that it is logged at "Error" level makes it quite annoying. The error does not have any other consequences, the loading succeeds anyway. Probably a better heuristic for local files would be to assume XML for files with an "xml" extension, and not try to validate otherwise. Reproducible: Always Steps to Reproduce: Execute following code: var request = new XMLHttpRequest(); request.open("get", "file:///path/to/WarAndPeace.txt", false); request.send(); alert(request.responseText); Actual Results: The contents of the file is alerted. The console has a "not well-formed" error message. Expected Results: The contents of the file is alerted. No error message in the console.
Comment 1•15 years ago
|
||
I can reproduce it on linux with a nightly build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•11 years ago
|
||
Reproduced on Mac. This is really annoying and conceals actual errors.
Updated•11 years ago
|
Component: XML → DOM: Mozilla Extensions
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•11 years ago
|
Component: DOM: Mozilla Extensions → DOM
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•