Opened 8 years ago

Closed 6 years ago

#15246 closed enhancement (fixed)

[patch][cla] dojo/request/handlers.js (1.8 ?) trying various activeX versions in every request ?

Reported by: mm Owned by: Bryan Forbes
Priority: high Milestone: 1.10
Component: IO Version: 1.7.2
Keywords: Cc: ben hockey
Blocked By: Blocking:

Description

I would like to suggest to test once instead in each call for available version of activeX object. I know yhat it is very likely that 90% will have version 6 and loop will exit with first iteration but anyway creating ActiveX and failing is quite expensive way.

if(has('activex')){

var dp = array.map([6, 4, 3, 2], function(n){

return 'MSXML' + n + '.DOMDocument';

}); dp.unshift('Microsoft.XMLDOM');

handleXML = function(response){

var result = response.data;

if(!result
!result.documentElement){

var text = response.text; array.some(dp, function(p){

try{

var dom = new ActiveXObject(p); dom.async = false; dom.loadXML(text); result = dom;

}catch(e){ return false; } return true;

});

}

return result;

};

}

Change History (10)

comment:1 Changed 8 years ago by mm

talking about array.some inside of handleXML if not clear

comment:2 Changed 8 years ago by bill

Component: GeneralIO
Owner: set to Bryan Forbes

comment:3 Changed 8 years ago by ben hockey

Cc: ben hockey added

comment:4 Changed 7 years ago by dylan

Milestone: tbd1.8
Priority: undecidedhigh

I think this should be addressed for 1.8 since this is the last major release where we're definitely supporting IE6.

comment:5 Changed 7 years ago by Kenneth G. Franqueiro

I'm not sure what you mean by "test once instead in each call". As far as I can tell, this test is performed only once, when the module initially loads. Perhaps you're confusing the factory function with the handle function (which is what would actually be called once per request)?

comment:6 Changed 7 years ago by Bryan Forbes

There are two parts to this: the array composition and the handleXML function. Both parts have a loop in them and handleXML is run once per request that has { handleAs: 'xml' } set on it. That being said, I wasn't sure if different versions of Microsoft's parser would work on certain documents where others would not which is why I have the routine testing which passes and fails for each request. If that isn't the case, we can certainly move the check for which library to use outside of the handleXML function.

comment:7 Changed 7 years ago by Bryan Forbes

In [28800]:

Changed GUIDs to MSDN documented GUIDs. refs #15246 !strict

comment:8 Changed 7 years ago by Colin Snover

Milestone: 1.82.0

1.8 is frozen. Move all enhancements to next release. If you need an exemption from the freeze for this ticket, contact me immediately.

comment:9 Changed 6 years ago by dylan

Milestone: 2.01.10
Summary: dojo/request/handlers.js (1.8 ?) trying various activeX versions in every request ?[patch][cla] dojo/request/handlers.js (1.8 ?) trying various activeX versions in every request ?

comment:10 Changed 6 years ago by Brandon Payton <brandon@…>

Resolution: fixed
Status: newclosed

In 2c3471d7947c3c6e688c41607b70c8381ba4efc7/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.