mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 931249 - Patch 10 - Bypass HTTP cache when downloading ServiceWorker script to compare against. r=bkelly
We don't have to bypass in ScriptLoader since this bypass will 'refresh' the cache to the new version. Talked to :mcmanus about bug comment 78 and there isn't an easy way to ask HTTP Cache for 24 hr expiration, so falling back to this. --HG-- extra : rebase_source : 57b206a0568bef5d32db3e64d5a2db008405304f
This commit is contained in:
parent
3b27da6f52
commit
7f20aa6e79
@ -86,6 +86,18 @@ public:
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsLoadFlags flags;
|
||||
rv = mChannel->GetLoadFlags(&flags);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
flags |= nsIRequest::LOAD_BYPASS_CACHE;
|
||||
rv = mChannel->SetLoadFlags(flags);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
|
||||
if (httpChannel) {
|
||||
// Spec says no redirects allowed for SW scripts.
|
||||
|
Loading…
Reference in New Issue
Block a user