Follow existing pref for gzip-compressed uploads

This commit is contained in:
Dan Stillman 2016-03-28 05:18:33 -04:00
parent 35530af1fb
commit 0c5eacbd0f

View File

@ -572,7 +572,8 @@ Zotero.Sync.APIClient.prototype = {
opts.dontCache = true; opts.dontCache = true;
opts.foreground = !options.background; opts.foreground = !options.background;
opts.responseType = options.responseType || 'text'; opts.responseType = options.responseType || 'text';
if (options.body && options.body.length >= this.MIN_GZIP_SIZE) { if (options.body && options.body.length >= this.MIN_GZIP_SIZE
&& Zotero.Prefs.get('sync.server.compressData')) {
opts.compressBody = true; opts.compressBody = true;
} }