Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1619 closed enhancement (wontfix)

Update XMLHttpRequest generation code

Reported by: raziel Owned by:
Priority: minor Milestone: 1.2.2
Component: ajax Version: 1.2.1
Keywords: XMLHttpRequest ActiveX MSXML Cc:
Blocked by: Blocking:

Description

The code that creates the XMLHttpREquest, inside the ajax function, should handle different versions of the MSXML ActiveX object. Right now the library uses Microsoft.XMLHTTP which is an old ProdID, just maintained for backwards compatibility.

Then, we should rearrange them to comply with Microsoft's intended use for each one of those version. A greater version number doesn't necessarily mean the most up to date functionality (weird , I know), and moreover, doesn't mean it's the version we should use to generate an XMLHttpRequest object.

According to http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx

Microsoft's preffered version for "web-intended" usage is MSXML2.XMLHTTP.6.0. No surprises there, since it's the latest version. However, the next recommended fall back is not v.5 nor v.4 but v.3.

Now, about the version independent ProdID: MSXML2.XMLHTTP, it's equivalent to MSXML2.XMLHTTP.3.0, given that is the preferred fall back version.

The Microsoft namespace: Microsoft.XMLHTTP is just implemented for legacy support, and only in MSXML v.3.

Whether we should keep the lookup for v.4 and v.5 depends on if we want to at least fall back to something even though it's not designed explicitly to support the web context, or we rather throw an error. I'd rather keep them, and maybe log a warning?

Having said all that, I think there should be an array and iterate over it to generate the XMLHttpRequest instance from the best possible ActiveX.

JSONRpcClient.msxmlNames = [ "MSXML2.XMLHTTP.6.0",

"MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "Microsoft.XMLHTTP" ]; /* this last one could be here or after the version independent id, for efficiency, depending on how true is the claim this is only available in V3 */

Change History (2)

comment:1 Changed 13 years ago by raziel

Sorry for the JSONRpcClient reference. I was working on patching that library and copy pasted the code.

comment:2 Changed 13 years ago by john

Component: coreajax
Milestone: 1.2.11.2.2
Resolution: wontfix
Status: newclosed
Version: 1.21.2.1

We discussed this with a member of the IE team and they agreed that our current technique is best. There's no reason to use multiple versions of the ActiveX controls as they provide no additional benefit (and, if anything, just introduce new bugs).

Note: See TracTickets for help on using tickets.