Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#3598 closed bug (duplicate)

Internet Explorer doesn't parse XML from file:/

Reported by: sbryant Owned by: flesler
Priority: low Milestone: 1.5
Component: ajax Version: 1.4.4
Keywords: explorer, xml Cc:
Blocked by: Blocking:


This ticket provides a fix for an IE bug: it won't parse an XML file without knowing that the file is XML. HTTP provides the Content-type header, but file:/ doesn't, and IE won't even fall back to the Windows file type settings (which would at least let it parse *.xml). Other browsers will attempt to parse XML from file:/ and don't have this problem.

This bug will affect anyone dry testing on the local file system with the Internet Explorer.

The fix checks whether the expected DOM tree is missing, and attempts to create it. A parse failure here leaves the HTTP request effectively in the same state as before.

The fix is 2 new lines of code in httpData(), directly before the "parsererror" test.

if ( xml && !data.documentElement && xhr.responseStream )

try { data.load( xhr.responseStream ); } catch(e){}

This patch is against jquery 1.2.6.


Attachments (1)

jquery.diff (567 bytes) - added by sbryant 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by sbryant

Attachment: jquery.diff added

comment:1 Changed 14 years ago by flesler

Cc: sbryant flesler added
need: Test CaseReview
Owner: set to flesler
Status: newassigned

Ok, seems good. I'll assign this to me so I have it at hand once I get to check this closer.

comment:2 Changed 12 years ago by Rick Waldron

Keywords: ajaxrewrite added

comment:3 Changed 12 years ago by jitter

Cc: sbryant flesler removed
Keywords: ajaxrewrite removed
Milestone: 1.31.5
Priority: minorlow
Resolution: duplicate
Status: assignedclosed

This is fixed with jQuery 1.5. Ypu just need to set dataType: "xml"

comment:4 Changed 12 years ago by jitter

Duplicate of #4807.

Note: See TracTickets for help on using tickets.