I am trying to tune HttpRequest for a file uploader, everything works
great except when the connection fails (say, one of the three servers
behind the load balancer dies) the upload dies. It should retry the
request a certain number of times - it should be configurable, as well
as with timeouts for seconds, how often to retry, etc.
A friend of mine says Gears supports this, even with a scaling retry
timeout, but I cannot figure out how... this is basically the snippet
of HttpRequest code. If more is needed just let me know. I don't think
anything is relevant to the actual HTTP request...
req.open('POST', 'test.php');
req.onreadystatechange = function(){
if(req.readyState == 4 && req.status == 200) {
// do successful stuff here
}
}
req.send(chunk);
Thanks!