#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: |
Description
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.
Steve
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | jquery.diff added |
---|
comment:1 Changed 14 years ago by
Cc: | sbryant flesler added |
---|---|
need: | Test Case → Review |
Owner: | set to flesler |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Keywords: | ajaxrewrite added |
---|
comment:3 Changed 12 years ago by
Cc: | sbryant flesler removed |
---|---|
Keywords: | ajaxrewrite removed |
Milestone: | 1.3 → 1.5 |
Priority: | minor → low |
Resolution: | → duplicate |
Status: | assigned → closed |
Version: | 1.2.6 → 1.4.4 |
This is fixed with jQuery 1.5. Ypu just need to set dataType: "xml"
Ok, seems good. I'll assign this to me so I have it at hand once I get to check this closer.