diff --git a/netwerk/cache2/CacheStorage.cpp b/netwerk/cache2/CacheStorage.cpp index c98c44d9ad52..c420193bb2bf 100644 --- a/netwerk/cache2/CacheStorage.cpp +++ b/netwerk/cache2/CacheStorage.cpp @@ -69,6 +69,11 @@ NS_IMETHODIMP CacheStorage::AsyncOpenURI(nsIURI *aURI, if (LookupAppCache()) { rv = ChooseApplicationCache(noRefURI, getter_AddRefs(appCache)); NS_ENSURE_SUCCESS(rv, rv); + + if (appCache) { + // From a chosen appcache open only as readonly + aFlags &= ~nsICacheStorage::OPEN_TRUNCATE; + } } if (appCache) {