Change 'dontCache' option to 'noCache' in HTTP.request()
This commit is contained in:
parent
20d7ef6c0b
commit
d394db61e5
5 changed files with 11 additions and 7 deletions
|
@ -583,7 +583,7 @@ var Zotero_File_Interface = new function() {
|
|||
'GET',
|
||||
fileURI,
|
||||
{
|
||||
dontCache: true,
|
||||
noCache: true,
|
||||
responseType: 'text'
|
||||
}
|
||||
);
|
||||
|
|
|
@ -56,7 +56,7 @@ Zotero_Import_Mendeley.prototype.translate = async function (options = {}) {
|
|||
'GET',
|
||||
fileURI,
|
||||
{
|
||||
dontCache: true,
|
||||
noCache: true,
|
||||
responseType: 'text'
|
||||
}
|
||||
);
|
||||
|
|
|
@ -123,8 +123,9 @@ Zotero.HTTP = new function() {
|
|||
* @param {Zotero.CookieSandbox} [options.cookieSandbox] - The sandbox from which cookies should
|
||||
* be taken
|
||||
* @param {Boolean} [options.debug] - Log response text and status code
|
||||
* @param {Boolean} [options.dontCache] - If set, specifies that the request should not be
|
||||
* @param {Boolean} [options.noCache] - If set, specifies that the request should not be
|
||||
* fulfilled from the cache
|
||||
* @param {Boolean} [options.dontCache] - Deprecated
|
||||
* @param {Boolean} [options.foreground] - Make a foreground request, showing
|
||||
* certificate/authentication dialogs if necessary
|
||||
* @param {Number} [options.logBodyLength=1024] - Length of request body to log
|
||||
|
@ -312,7 +313,10 @@ Zotero.HTTP = new function() {
|
|||
}
|
||||
|
||||
// Disable caching if requested
|
||||
if (options.dontCache) {
|
||||
if (options.noCache || options.dontCache) {
|
||||
if (options.dontCache) {
|
||||
Zotero.warn("HTTP.request() 'dontCache' option is deprecated -- use noCache instead");
|
||||
}
|
||||
channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;
|
||||
}
|
||||
|
||||
|
@ -870,7 +874,7 @@ Zotero.HTTP = new function() {
|
|||
Zotero.debug("Proxy required for " + uri + " -- making HEAD request to trigger auth prompt");
|
||||
yield Zotero.HTTP.request("HEAD", uri, {
|
||||
foreground: true,
|
||||
dontCache: true
|
||||
noCache: true
|
||||
})
|
||||
.catch(function (e) {
|
||||
// Show error icon at startup
|
||||
|
|
|
@ -1134,7 +1134,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
|||
successCodes: [200, 300, 404],
|
||||
responseType: 'text',
|
||||
requestObserver: xmlhttp => request.setChannel(xmlhttp.channel),
|
||||
dontCache: true,
|
||||
noCache: true,
|
||||
errorDelayIntervals: this.ERROR_DELAY_INTERVALS,
|
||||
errorDelayMax: this.ERROR_DELAY_MAX,
|
||||
debug: true
|
||||
|
|
|
@ -641,7 +641,7 @@ Zotero.Sync.APIClient.prototype = {
|
|||
let opts = {}
|
||||
Object.assign(opts, options);
|
||||
opts.headers = this.getHeaders(options.headers);
|
||||
opts.dontCache = true;
|
||||
opts.noCache = true;
|
||||
opts.foreground = !options.background;
|
||||
opts.responseType = options.responseType || 'text';
|
||||
if (options.body && options.body.length >= this.MIN_GZIP_SIZE
|
||||
|
|
Loading…
Reference in a new issue