Closed
Bug 768803
Opened 13 years ago
Closed 13 years ago
XHR
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 768804
People
(Reporter: jmcf, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.4 Safari/537.1
Steps to reproduce:
var imgSrc = 'https://graph.facebook.com/picture/100001127136581?type=square';
var xhr = new XMLHttpRequest({mozSystem: true});
xhr.open('GET', imgSrc, true);
xhr.responseType = 'blob';
xhr.timeout = 6000;
xhr.onload = function(e) {
window.console.log('Success CB invoked for img uid',uid);
if (xhr.status === 200 || xhr.status === 0) {
window.console.log('200 ok for uid',uid);
var mblob = e.target.response;
var reader = new FileReader();
reader.onload = function(e) {
cb(e.target.result);
}
reader.readAsDataURL(mblob);
}
}
xhr.ontimeout = function(e) {
window.console.log('Timeout!!! while retrieving img for uid',uid);
}
xhr.onerror = function(e) {
window.console.error(e);
cb('');
}
xhr.send();
}
Actual results:
Error callback is invoked
Expected results:
onload callback with success
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•