Opened 16 years ago
Closed 15 years ago
#575 closed defect (fixed)
[CLA] [fix provided] IE's responseXML (which gets called by dojo.io.bind()) does not really return xml doc when mimetype = "text/xml" and content-type != "text/xml"
Reported by: | Owned by: | alex | |
---|---|---|---|
Priority: | low | Milestone: | 0.9 |
Component: | Core | Version: | 0.2 |
Keywords: | dojo.io.bind xml text/xml application/xml ie internet explorer | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
I encountered this problem while trying to develop a script on my machine using the filesystem and not running a server. I was using dojo.io.bind() in this manner:
dojo.io.bind({ url: "xmlfile.xml", mimetype: "text/xml", load: function(type, xml, e) { processXMLData(type, xml, e); } });
On Firefox I did really get an XML document but when using IE I wasn't getting an XML document (I'm not sure what kind of object I got back, although it was a non-null object).
This is my proposed solution, I made this change in /src/io/BrowserIO.js to function doLoad(kwArgs, http, url, query, useCache):
}else if((kwArgs.mimetype == "application/xml")|| (kwArgs.mimetype == "text/xml")){ ret = http.responseXML; if(!ret || typeof ret == "string" || /* Begin change */ ((http.getResponseHeader("Content-Type") != "text/xml")) && dojo.render.html.ie) { // This line was added by [email protected] /* End change */ ret = dojo.dom.createDocumentFromText(http.responseText); } }
I added the check for Internet Explorer because I encountered this problem in IE. I'm not sure if any other browsers (besides Firefox) exhibit the same problem.
Change History (12)
comment:1 Changed 16 years ago by
Component: | General → Core |
---|
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
Milestone: | 0.2.2release → 0.3release |
---|---|
Owner: | changed from anonymous to alex |
Status: | new → assigned |
Jose: have you filed a CLA?
comment:4 Changed 16 years ago by
CLA? I don't know what that is. Can you provide more information or email me personally?
comment:5 Changed 16 years ago by
The CLA (Contributor License Agreement):
http://dojotoolkit.org/icla.txt
Some info on why the CLA is required:
comment:6 Changed 16 years ago by
Milestone: | 0.3release → 0.4 |
---|---|
Priority: | normal → low |
Gonna push this back to 0.4; it's a really minor thing (IE with a filesystem is the issue), we can fix but we're inundated for 0.3.
comment:7 Changed 16 years ago by
severity: | normal → blocker |
---|
don't know why you changed the priority from normal to low.... AJAX is just not working with dojo in InternetEXplorer... that is a major bug to me. It makes dojo totally useless
comment:8 Changed 16 years ago by
Cc: | [email protected]… added |
---|
Not sure who the anonymous person is... but I'm emailing Jose to ask if he has filed a CLA or otherwise...
And to the anonymous poster, AJAX works in IE, my first dojo adventures were with dojo.io.bind in IE... and it worked back then...
-Karl
comment:9 Changed 16 years ago by
Summary: | IE's responseXML (which gets called by dojo.io.bind()) does not really return xml doc when mimetype = "text/xml" and content-type != "text/xml" → [CLA] [fix provided] IE's responseXML (which gets called by dojo.io.bind()) does not really return xml doc when mimetype = "text/xml" and content-type != "text/xml" |
---|
comment:10 Changed 16 years ago by
Milestone: | 0.4 → 0.4.1 |
---|
comment:11 Changed 16 years ago by
Milestone: | 0.4.1 → 0.5 |
---|
small change to the code, I misplaced a logic statement.