Closed Bug 837463 Opened 8 years ago Closed 8 years ago

XMLHttpRequest responseXML is <parsererror>

Categories

(Firefox :: Untriaged, defect)

18 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 289714

People

(Reporter: bbi5291, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20130116073211

Steps to reproduce:

Make a request to an endpoint that returns invalid XML:
---
xhr = new XMLHttpRequest(); xhr.open('GET', 'http://wcipeg.com/etc/brian/invalidXML', false); xhr.send();
---
In this particular case, the XML is invalid because it looks like this:
---
<?xml version="1.0" encoding="UTF-8"?>
<root>This is the root element.</root>
<junk>This extra node makes the XML invalid.</junk>
---



Actual results:

When the request returned, xhr.responseXML was a <parsererror> node


Expected results:

xhr.responseXML should have been null.

At least, that's what this thread from way back suggests: https://bugzilla.mozilla.org/show_bug.cgi?id=289714

(Also, apparently Chrome and Safari both return null.)
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 289714
You need to log in before you can comment on or make changes to this bug.