我有一个问题,即通阿贾克斯沟通,从另一台服务器消耗一定的RESTful服务的应用程序。
问题接缝出现只是IE而当消费应用是在具有SSL服务器,我的意思是,当我从其他箱一切在同一台服务器消耗同样的服务工作正常。
我有一个服务器上的RESTful服务( HTTPS://api.restbla/ .. )有SSL,我已经消耗这些从其他服务器(带或不带SSL证书)
使用Internet Explorer测试中,我得到的结果:
- 如果我从我的本地作品消费服务
- 如果我来自同一箱(其中宁静托管)消费服务工程
- 如果我从另一台服务器withouth的SSL作品消费服务
- 但是,当我从一台服务器消耗上HTTPS服务不上IE浏览器。
所有与Chrome和FF的前测试工作
这是一个即时通讯使用,使AJAX调用JavaScript
function load(_url, _callback, _params, _type, _htmlMethod, _onStartFunction, _onFinishFunction) {
var xhr;
if (isFunction(_onStartFunction)) { _onStartFunction(); }
ieVersion = getInternetExplorerVersion();
if (typeof XMLHttpRequest !== 'undefined') {
console.log("XMLHttpRequest");
xhr = new XMLHttpRequest();
}else {
if (ieVersion > 7){
console.log("XDomainRequest");
xhr = new XDomainRequest();
}else{
var versions = [ "MSXML2.XmlHttp.5.0", "MSXML2.XmlHttp.4.0", "MSXML2.XmlHttp.3.0", "MSXML2.XmlHttp.2.0", "Microsoft.XmlHttp" ];
for ( var i = 0, len = versions.length; i < len; i++) {
try {
console.log("ActiveXObject: " + versions[i]);
xhr = new ActiveXObject(versions[i]);
break;
} catch (e) { /* attempt next one*/ }
}
}
}
xhr.onreadystatechange = ensureReadiness;
if (_type == JSON_TYPE) {
contentType = "application/json";
}else{
contentType = 'text/plain';
}
function ensureReadiness() {
if (xhr.readyState < 4) { return; }
if (xhr.status !== 200) {
showServiceDown();
if (isFunction(_onFinishFunction)) { _onFinishFunction();}
return;
}
if (xhr.readyState === 4) {
if (isFunction(_onFinishFunction)) {_onFinishFunction(); }
var responseText = "";
responseText = xhr.responseText;
if (_type == JSON_TYPE) {
_callback(responseText);
} else if (_type = HTML_TYPE) {
var replaced = responseText.replace(/\\/g, '///');
_callback(replaced);
} else { _callback(responseText); }
}
}
if ((_htmlMethod == undefined) || (_htmlMethod == null) || (_htmlMethod == "")) {
_htmlMethod = METHOD_POST;
}
xhr.open(_htmlMethod, _url, true);
xhr.withCredentials = true;
xhr.setRequestHeader("Content-type", contentType);
_params = (_params != undefined) ? _params : null;
xhr.send(_params);
}
我不能使用任何JavaScript框架为这个项目。
该证书是由公司内部米德供内部使用的唯一,所以任何浏览器验证邮件失败了,我不知道这有什么做的问题。
我希望任何人有这个问题的一些解决方案。
非常感谢您的时间。