I would have expected the http() call to return false in this code:
but apparently it doesn't. Is this the correct behavior?
if you change the webFile var to "http://www.iamsurethatthiswebsitedoesnotexist.com/this_file_does_not_exist.txt" then it does return false.
Thanks.
PHP Code:
var _init = false;
function preMain() {
_init = true;
}
function main() {
if(_init) {
var webFile = "http://www.esignal.com/this_file_does_not_exist.txt";
var f = new HTTP(webFile);
var success = f.open("rt");
if(success) {
debugPrintln("Found " + webFile);
} else {
debugPrintln("Did not find " + webFile);
}
_init = false;
}
}
if you change the webFile var to "http://www.iamsurethatthiswebsitedoesnotexist.com/this_file_does_not_exist.txt" then it does return false.
Thanks.
Comment