Bug 134681

Summary: [Curl] Cache entry invalidated too early.
Product: WebKit Reporter: peavo
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alex.christensen, bfulgham, buildbot, commit-queue, galpeter, mmatyas, rniwa
Priority: P2 Keywords: Curl
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 none

peavo
Reported 2014-07-07 08:44:20 PDT
When a cache entry has expired, it is invalidated when a request for the corresponding url is started. This is too early, since the resource is possibly not modified (even though it has expired), and the server might respond with a 304 (not modified) response. When we then receive a 304 response, the cache entry is deleted, and we have no cached response/data to provide. This can be solved by not invalidating the entry when a request for that url is started, but instead invalidate when a 200 OK response is received, which means the resource has been modified (this is already implemented).
Attachments
Patch (2.02 KB, patch)
2014-07-07 08:53 PDT, peavo
no flags
Patch (2.86 KB, patch)
2014-07-08 12:13 PDT, peavo
no flags
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 (503.79 KB, application/zip)
2014-07-08 13:17 PDT, Build Bot
no flags
peavo
Comment 1 2014-07-07 08:53:54 PDT
Alex Christensen
Comment 2 2014-07-07 23:24:18 PDT
Comment on attachment 234489 [details] Patch Looks good to me, except now CurlCacheManager::isCached needs a const.
peavo
Comment 3 2014-07-08 12:13:19 PDT
peavo
Comment 4 2014-07-08 12:14:42 PDT
(In reply to comment #2) > (From update of attachment 234489 [details]) > Looks good to me, except now CurlCacheManager::isCached needs a const. Thanks! Added const modifier to isCached method in latest patch.
Build Bot
Comment 5 2014-07-08 13:17:24 PDT
Comment on attachment 234580 [details] Patch Attachment 234580 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5621920938590208 New failing tests: media/W3C/video/src/src_reflects_attribute_not_source_elements.html
Build Bot
Comment 6 2014-07-08 13:17:27 PDT
Created attachment 234586 [details] Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
peavo
Comment 7 2014-07-08 13:49:57 PDT
(In reply to comment #5) > (From update of attachment 234580 [details]) > Attachment 234580 [details] did not pass mac-wk2-ews (mac-wk2): > Output: http://webkit-queues.appspot.com/results/5621920938590208 > > New failing tests: > media/W3C/video/src/src_reflects_attribute_not_source_elements.html I don't think this is related to this patch, as it only affects platforms using Curl.
WebKit Commit Bot
Comment 8 2014-07-09 20:11:47 PDT
Comment on attachment 234580 [details] Patch Clearing flags on attachment: 234580 Committed r170949: <http://trac.webkit.org/changeset/170949>
WebKit Commit Bot
Comment 9 2014-07-09 20:11:51 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.