Closed Bug 462549 Opened 13 years ago Closed 13 years ago
Verify that an appcache manifest hasn't changed at the end of an update
The offline spec requires that at the end of a successful cache update, we re-download the manifest to make sure it hasn't changed. This is to prevent us from grabbing a partial snapshot of the app during a server push.
Comment on attachment 345762 [details] [diff] [review] v1 +NS_IMPL_ISUPPORTS4(nsManifestCheck, + nsIRequestObserver, + nsIStreamListener, + nsIChannelEventSink, + nsIInterfaceRequestor); shouldn't put a semicolon at the end here, some compilers don't like that + nsCString foo; + foo.Assign(aFromSegment, aCount); this seems unused? + PRUint32 bytesRead = 0; + aStream->ReadSegments(ReadManifest, this, aCount, &bytesRead); you don't have to initialize bytesRead + // Redirects should cause the load (and therefore the update) to fail. + return NS_ERROR_FAILURE; you have to allow REDIRECT_INTERNAL redirects here
Includes the review fixes and properly includes the test file.
Attachment #345762 - Attachment is obsolete: true
err, this was the new patch.
Attachment #346774 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.