Bug Tracker

Ticket #963 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

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

Reported by: john Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.1.3 Component: ajax
Version: 1.1.2 Keywords:
Cc: Needs: Review

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.

Attachments

Change History

Changed 2 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?

Changed 2 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        };

Changed 2 years ago by john

  • need set to Test Case
  • version set to 1.1.2
  • milestone set to 1.1.3

Changed 2 years ago by joern

  • need changed from Test Case to Review

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");
       };

Changed 2 years ago by john

  • status changed from new to closed
  • resolution set to fixed

This has been fixed in SVN (by joern).

Note: See TracTickets for help on using tickets.