Closed Bug 461071 Opened 16 years ago Closed 16 years ago

allow application caches to be obsoleted

Categories

(Core :: Networking: Cache, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dcamp, Assigned: dcamp)

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

Attached patch v1Splinter Review
The application cache spec recently changed to allow application caches to be obsoleted by removing the manifest from the server.  The attached patch implements this.
Flags: blocking1.9.1?
Attachment #344210 - Flags: review?(honzab)
Attachment #344210 - Flags: superreview?(bzbarsky)
Attachment #344210 - Flags: review?(bzbarsky)
Comment on attachment 344210 [details] [diff] [review]
v1

>+++ b/netwerk/cache/src/nsDiskCacheDeviceSQL.cpp
>+  nsresult rv = statement->BindUTF8StringParameter(
>+                                           0, group);

Pull the args up to the previous line?

>+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
>+        // If the server returned a 404 or 410 for this manifest, we
>+        // must obsolete the cache group.

Why only those error codes?  Why not 500, for example?  (I assume there's a better reason than "the spec says so".)
(In reply to comment #1)
> >+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
> >+        // If the server returned a 404 or 410 for this manifest, we
> >+        // must obsolete the cache group.
> 
> Why only those error codes?  Why not 500, for example?  (I assume there's a
> better reason than "the spec says so".)

I think the idea is that a 404 or 410 would most likely be an intentional removal of the manifest.  You wouldn't want a transient server error to obsolete the cache on the client side.
Comment on attachment 344210 [details] [diff] [review]
v1

OK.  Document that here, and looks good.
Attachment #344210 - Flags: superreview?(bzbarsky)
Attachment #344210 - Flags: superreview+
Attachment #344210 - Flags: review?(bzbarsky)
Attachment #344210 - Flags: review+
Comment on attachment 344210 [details] [diff] [review]
v1

Please just change title of the test_obsolete.html. Also there is some strange indention in test files.

You should delete the manifest from the server even the test fails early. But we can use OfflineTest.putData after 443017 lands for this.
Attachment #344210 - Flags: review?(honzab) → review+
Flags: blocking1.9.1? → blocking1.9.1+
http://hg.mozilla.org/mozilla-central/rev/785a4fc138f5
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: