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 { 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) { catch (e) {
Zotero.debug(e, 1);
Components.utils.reportError(e);
ps.alert( ps.alert(
null, null,
Zotero.getString('general.error'), Zotero.getString('general.error'),

View File

@ -1804,7 +1804,12 @@ Zotero.Sync.Server = new function () {
} }
}; };
try { 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) { catch (e) {
_error(e); _error(e);