- Code: Select all
<!DOCTYPE html>
<html>
<head>
<script>
function do_something(data){
var hhh = new XMLHttpRequest();
hhh.onreadystatechange = function() {
console.log("XHR debug: " + hhh.readyState + " status " + hhh.status);
if(hhh.readyState === 4 && hhh.status === 200) {
console.log("Response: " + hhh.responseText);
document.getElementById("test").innerHTML = hhh.responseText;
}
};
// This URL works
hhh.open("GET", "https://code.jquery.com/jquery-3.3.1.min.js");
// This URL doesn't work
hhh.open("GET", "https://tools.ietf.org/html/rfc2616");
hhh.send();
}
</script>
</head>
<body onload="do_something()">
<div id="test"></div>
</body>
</html>
When an URL does not work, it ends up with status "canceled" in OnResourceLoadComplete. And that's all I know, really, I see no other signs of error (having looked in, e g console log and OnLoadError). I think - but I'm not totally sure - that some URL would fail on one computer and succeed on another computer, suggesting this could be some timing or network issue...?
As for CORS, the custom scheme is registered with
- Code: Select all
AddCustomScheme(SchemeName, False, False, False, False, False, True)
so CORS should not interfere here. I've also tried disabling web security, which makes no difference.
I'm using v3.3282.1741 and a matching Cef4Delphi, if that matters. Thankful for any hints on how to continue debugging this problem.