Bug 26681 - Problem updating applicationCache when server returns 304
Summary: Problem updating applicationCache when server returns 304
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Server 2003
: P2 Normal
Assignee: Alexey Proskuryakov
URL: http://new.efficientcoder.net/2009/06...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-06-24 08:36 PDT by Kevin D. Wolf
Modified: 2010-08-12 13:49 PDT (History)
2 users (show)

See Also:


Attachments
proposed fix (3.75 KB, patch)
2009-06-25 07:24 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff
improve the fix (2.57 KB, patch)
2009-06-26 06:23 PDT, Alexey Proskuryakov
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin D. Wolf 2009-06-24 08:36:47 PDT
1) Configure an application to use a manifest and window.applicationCache
2) Download initial cache, everythings works fine.  Server returns an ETag or Last-Modified date within the header.  Also has headers to disable cacheing.
3) Cache is updated, but the one or more of the resources aren't
4) WebKit requests a resource sending up If-Modified-Since and If-None-Match header headers.
5) Server returns a 304 Not Modified.
6) WebKit makes another request (goes back to step 4) this process will go on in an infinite loop.

You can see a more detailed overview at:
http://new.efficientcoder.net/2009/06/webkitsafari-application-cache-work.html
Comment 1 Mark Rowe (bdash) 2009-06-24 12:03:06 PDT
<rdar://problem/7003461>
Comment 2 Alexey Proskuryakov 2009-06-25 02:20:40 PDT
From code inspection, looks like we fail to call m_pendingEntries.remove() in ApplicationCacheGroup::didReceiveResponse() for 304 responses.
Comment 3 Alexey Proskuryakov 2009-06-25 07:24:23 PDT
Created attachment 31855 [details]
proposed fix
Comment 4 Alexey Proskuryakov 2009-06-25 21:46:40 PDT
Committed <http://trac.webkit.org/changeset/45247>. I've slightly changed the code to look more like other code paths.
Comment 5 Alexey Proskuryakov 2009-06-26 06:18:50 PDT
Tiger buildbot says this isn't quite fixed.
Comment 6 Alexey Proskuryakov 2009-06-26 06:23:14 PDT
Created attachment 31930 [details]
improve the fix
Comment 7 Alexey Proskuryakov 2009-06-26 12:39:33 PDT
Committed <http://trac.webkit.org/changeset/45275>.