diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index ea54b5af6..97ccefe46 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -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'), diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index c5c264d98..f2a9fc324 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -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);