Fix sync and debug output submission in Nightly

(sendAsBinary() removal)
This commit is contained in:
Dan Stillman 2015-04-07 16:59:33 -04:00
parent 2afebc79d0
commit b2d5612526
2 changed files with 14 additions and 2 deletions

View file

@ -730,9 +730,16 @@ Zotero_Preferences.Debug_Output = {
}
};
try {
req.sendAsBinary(data);
// Send binary data
let numBytes = data.length, ui8Data = new Uint8Array(numBytes);
for (let i = 0; i < numBytes; i++) {
ui8Data[i] = data.charCodeAt(i) & 0xff;
}
req.send(ui8Data);
}
catch (e) {
Zotero.debug(e, 1);
Components.utils.reportError(e);
ps.alert(
null,
Zotero.getString('general.error'),

View file

@ -1804,7 +1804,12 @@ Zotero.Sync.Server = new function () {
}
};
try {
req.sendAsBinary(data);
// Send binary data
let numBytes = data.length, ui8Data = new Uint8Array(numBytes);
for (let i = 0; i < numBytes; i++) {
ui8Data[i] = data.charCodeAt(i) & 0xff;
}
req.send(ui8Data);
}
catch (e) {
_error(e);