Ticket #2587 (closed feature: duplicate)

Opened 3 years ago

Last modified 3 years ago

IE 8 has difficulties with local files, even if on same origin path. A change to xhr fixes

Reported by: scaddenp Owned by: tschaub
Priority: major Milestone: 2.10 Release
Component: Request Version: 2.8
Keywords: IE local access Cc:
State: Complete

Description

The problem lies with IE implementation of XHR. Fix is change request/xmlhttprequest.js

Change the function cXMLHttpRequest() to this.

function cXMLHttpRequest() {

this._object = oXMLHttpRequest && (window.location.protocol !== "file:" !window.ActiveXObject) ?

new oXMLHttpRequest

: new window.ActiveXObject("Microsoft.XMLHTTP");

};

This ensures it uses the activex for local file access.

Change History

Changed 3 years ago by bartvde

  • milestone changed from 2.8 Release to 2.10 Release

Milestone 2.8 is in the past. Changing to 2.10.

Phil, can you do a few things: 1) check if the problem also occurs when you use the latest version of the XMLHttpRequest library ( http://code.google.com/p/xmlhttprequest/), this is most likely the case. 2) if this is the case, can you raise the issue there as well (see also  http://code.google.com/p/xmlhttprequest/issues/detail?id=23 which seems related).

Changed 3 years ago by scaddenp

Problem is still present in the latest version. I have posted on the issue there as suggested.

Changed 3 years ago by bartvde

  • state set to Awaiting User Feedback

Phil, the creator of the XMLHttpRequest library has applied a fix (and released version 1.0.4), see:  http://code.google.com/p/xmlhttprequest/downloads/list

Is this something you can test?

Changed 3 years ago by bartvde

Phil, if you need a patch to upgrade OpenLayers to version 1.0.4 of XMLHttpRequest please see  http://trac.openlayers.org/attachment/ticket/2625/xmlhttp104.patch

Changed 3 years ago by bartvde

  • status changed from new to closed
  • state changed from Awaiting User Feedback to Complete
  • resolution set to duplicate

I've had confirmation from Phil that XMLHttpRequest 1.0.4 fixes his issue:

> can you try with the attached XMLHttpRequest.js, just drop it in your OpenLayers
source tree. TIA.
>    

Boy its frustrating trying to learn too many things at once. Should have 
diffed the see what I needed to do but I am only working a few hours a 
day at moment.


Anyway, to the substantive point. I dropped your attachment into tree 
and it works. Tested with FF, IE8, Safari, Chrome 4. IE8 was the 
critical one and it worked fine.

-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

So I am closing this one as a duplicate of ticket:2625

Note: See TracTickets for help on using tickets.