Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#963 closed bug (fixed)

IE 7 can't request file:// via XHR

Reported by: john Owned by:
Priority: major Milestone: 1.1.3
Component: ajax Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:

Description

This is a known bug: http://xhab.blogspot.com/2006/11/ie7-support-for-xmlhttprequest.html

Essentially, you have to never use the new XHR interface presented in IE7, and just use the old ActiveX stuff instead.

Change History (5)

comment:1 Changed 13 years ago by steveivy@…

John, would someone who had IE7 from Vista, for example, even have the old AciveX object? Could the code that loads the XHR stuff figure out if the url is a file: url or not and only try the old activex object if it needs to?

comment:2 Changed 13 years ago by steveivy@…

Simplistically,this may do it: (from jquery-latest.js)

1887    if ( window.ActiveXObject || !window.XMLHttpRequest )
1888        XMLHttpRequest = function(){
1889            return new ActiveXObject("Microsoft.XMLHTTP");
1890        };

comment:3 Changed 13 years ago by john

Milestone: 1.1.3
need: Test Case
Version: 1.1.2

comment:4 Changed 13 years ago by joern

need: Test CaseReview

Hard to write a test for this.

Assuming there is no browser that offers an ActiveXObject without supporting the XMLHTTP argument, this should do the trick:

if ( window.ActiveXObject )
       XMLHttpRequest = function(){
            return new ActiveXObject("Microsoft.XMLHTTP");
       };

comment:5 Changed 13 years ago by john

Resolution: fixed
Status: newclosed

This has been fixed in SVN (by joern).

Note: See TracTickets for help on using tickets.