Ticket #4799 (closed bug: duplicate)
$.get fails to read Content-type: text/xml in Internet Explorer 7
| Reported by: | nigel.chapman | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | ajax | Version: | 1.3.2 |
| Keywords: | $.get internet explorer | Cc: | |
| Blocking: | Blocked by: |
Description
How to reproduce this:
$.get('/some-url', null, function(xml) {
alert('XML: ' + xml); Then do something with the XML.
});
Then have your controller at /some-url issue:
header('Content-type: text/xml; charset=utf-8'); PHP Example
... and then a well-formed XML document. Your alert box won't show XML because the xml variable will be empty. Trying to do anything with the XML results in a type mismatch.
I've only tested this on FF 3.5 (which his OK) and IE7, which throws an unenlightening "type mismatch".
Sorry I can't proviode a full test case; I'm at work and there really isn't time for even reporting this. Provided 'as is'; hope it's helpful. Ignore otherwise.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Seems to be working fine on my installation. It's true that FF has a string representation ([object XMLDocument]) for the response, while IE7 has nothing, but I can manipulate the XML object.