Bug 866636 - AddonUpdateChecker bypasses it cache, but doesn't inhibit writing to it. r=Unfocused

This commit is contained in:
Ritesh Modi 2013-05-03 16:24:51 +12:00
Родитель eedb27e4b2
Коммит 4a1d85259b
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -412,6 +412,8 @@ function UpdateParser(aId, aUpdateKey, aUrl, aObserver) {
this.request.open("GET", this.url, true); this.request.open("GET", this.url, true);
this.request.channel.notificationCallbacks = new CertUtils.BadCertHandler(!requireBuiltIn); this.request.channel.notificationCallbacks = new CertUtils.BadCertHandler(!requireBuiltIn);
this.request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE; this.request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
// Prevent the request from writing to cache.
this.request.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
this.request.overrideMimeType("text/xml"); this.request.overrideMimeType("text/xml");
var self = this; var self = this;
this.request.addEventListener("load", function loadEventListener(event) { self.onLoad() }, false); this.request.addEventListener("load", function loadEventListener(event) { self.onLoad() }, false);