mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 827750 - Inhibiting HTTP cache for app updates. r=fabrice
This commit is contained in:
parent
88feeaf040
commit
b02959b0d1
@ -1266,6 +1266,7 @@ this.DOMApplicationRegistry = {
|
|||||||
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||||
.createInstance(Ci.nsIXMLHttpRequest);
|
.createInstance(Ci.nsIXMLHttpRequest);
|
||||||
xhr.open("GET", aData.manifestURL, true);
|
xhr.open("GET", aData.manifestURL, true);
|
||||||
|
xhr.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
|
||||||
xhr.responseType = "json";
|
xhr.responseType = "json";
|
||||||
if (app.etag) {
|
if (app.etag) {
|
||||||
xhr.setRequestHeader("If-None-Match", app.etag);
|
xhr.setRequestHeader("If-None-Match", app.etag);
|
||||||
@ -1363,7 +1364,7 @@ this.DOMApplicationRegistry = {
|
|||||||
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||||
.createInstance(Ci.nsIXMLHttpRequest);
|
.createInstance(Ci.nsIXMLHttpRequest);
|
||||||
xhr.open("GET", app.manifestURL, true);
|
xhr.open("GET", app.manifestURL, true);
|
||||||
xhr.channel.loadFlags |= Ci.nsIRequest.VALIDATE_ALWAYS;
|
xhr.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
|
||||||
xhr.channel.notificationCallbacks = this.createLoadContext(aData.appId,
|
xhr.channel.notificationCallbacks = this.createLoadContext(aData.appId,
|
||||||
aData.isBrowser);
|
aData.isBrowser);
|
||||||
xhr.responseType = "json";
|
xhr.responseType = "json";
|
||||||
@ -1426,7 +1427,7 @@ this.DOMApplicationRegistry = {
|
|||||||
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||||
.createInstance(Ci.nsIXMLHttpRequest);
|
.createInstance(Ci.nsIXMLHttpRequest);
|
||||||
xhr.open("GET", app.manifestURL, true);
|
xhr.open("GET", app.manifestURL, true);
|
||||||
xhr.channel.loadFlags |= Ci.nsIRequest.VALIDATE_ALWAYS;
|
xhr.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
|
||||||
xhr.channel.notificationCallbacks = this.createLoadContext(aData.appId,
|
xhr.channel.notificationCallbacks = this.createLoadContext(aData.appId,
|
||||||
aData.isBrowser);
|
aData.isBrowser);
|
||||||
xhr.responseType = "json";
|
xhr.responseType = "json";
|
||||||
@ -1777,6 +1778,7 @@ this.DOMApplicationRegistry = {
|
|||||||
|
|
||||||
let requestChannel = NetUtil.newChannel(aManifest.fullPackagePath())
|
let requestChannel = NetUtil.newChannel(aManifest.fullPackagePath())
|
||||||
.QueryInterface(Ci.nsIHttpChannel);
|
.QueryInterface(Ci.nsIHttpChannel);
|
||||||
|
requestChannel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
|
||||||
if (app.packageEtag) {
|
if (app.packageEtag) {
|
||||||
debug('Add If-None-Match header: ' + app.packageEtag);
|
debug('Add If-None-Match header: ' + app.packageEtag);
|
||||||
requestChannel.setRequestHeader("If-None-Match", app.packageEtag, false);
|
requestChannel.setRequestHeader("If-None-Match", app.packageEtag, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user