Opened 12 years ago

Closed 12 years ago

#3294 closed defect (fixed)

0.9: xhr problems with XML on IE 6.

Reported by: Jared Jurkiewicz Owned by: alex
Priority: high Milestone: 0.9
Component: IO Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

One of my co-workers uncovered what appears to be a problem with xhrGet and IE 6 and local files. Namely, there are cases where it isn't returning the actual document. There will be a simple testcase attached that demonstrates the problem. Just drop them into dojo/test and open the file:

xhr_local_xml.html

Attachments (2)

xhr_local_xml.html (455 bytes) - added by Jared Jurkiewicz 12 years ago.
xhr_local_xml.xml (67 bytes) - added by Jared Jurkiewicz 12 years ago.

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by Jared Jurkiewicz

Attachment: xhr_local_xml.html added

Changed 12 years ago by Jared Jurkiewicz

Attachment: xhr_local_xml.xml added

comment:1 Changed 12 years ago by Jared Jurkiewicz

The two files have been attached that make up the testcase. On FF, it returns [Object] in the alert. In IE, it returns null.

This is affecting my co-worker's ability to port application code over to 0.9 and effectively test it.

comment:2 Changed 12 years ago by James Burke

Owner: changed from alex to James Burke
Status: newassigned

comment:3 Changed 12 years ago by James Burke

Owner: changed from James Burke to alex
Status: assignednew

So this seems to be a quirk of IE. In 0.4.3, the following test is a comparable test:

tests/io/test_BrowserIO.frag.html

In 0.4.3, it works because the local loading in IE 6 following into this if branch (around line 292 in src/io/BrowserIO.js):

}else if((kwArgs.mimetype == "application/xml")|| (kwArgs.mimetype == "text/xml")){
    ret = http.responseXML;
    if(!ret || typeof ret == "string" || !http.getResponseHeader("Content-Type")) {
        ret = dojo.dom.createDocumentFromText(http.responseText);
    }
}else{

The dojo.dom.createDocumentFromText path is followed (http.getResponseHeader("Content-Type") is empty since loaded from a local file). However in 0.9 base, there is no createDocumentFromText function. There appears to be one in dojox/data/dom.js named dojox.data.dom.createDocument, but obviously using it is not an option for base.

I'm flipping back to Alex to see what the ruling on this is. Since IE 7 requires a web server to run dojo, perhaps now the same must be said for IE 6 (the test works fine when loading from a web server). Otherwise, it looks like we would need to port the equivalent of createDocumentFromText into 0.9 base.

comment:4 Changed 12 years ago by Jared Jurkiewicz

Followup on this. Any updates?

comment:5 Changed 12 years ago by alex

Resolution: fixed
Status: newclosed

(In [9899]) ensure that XML documents are passed back unserialized on IE, even when it's being lame. Fixes #3294

Note: See TracTickets for help on using tickets.