Hi,
When I try to send an HTTP GET request through XMLHttpRequest it works on non-secure HTTP.
But when sent over HTTPS, different browsers gave different results:
On Firefox 3.0.2: - The GET request doesn't reach the web server.
On IE 7: - The GET request reached the web server.
Does this have something to do with Firefox 3 getting stricter with untrusted certificates? Is there a way around this?
I've already added the URL as an exception in Firefox's Certificate Manager. The error console doesn't report any error. I've added a try-catch around XMLHttpRequest's open() and send. No exception is thrown.
Using both absolute and relative URL path doesn't work.
Here's the code snippet:
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
return false;
}
}
}
// we won't be handling any HTTP response
xmlHttp.onreadystatechange=function()
{
// do nothing..
}
// send HTTP GET request
try
{
xmlHttp.open("GET", "/[relative path to request]", true);
xmlHttp.send(null);
}
catch (e)
{
alert('Error sending HTTP GET request!');
return false;
}
Thanks, Kenneth