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).
Created attachment 234489 [details] Patch
Comment on attachment 234489 [details] Patch Looks good to me, except now CurlCacheManager::isCached needs a const.
Created attachment 234580 [details] Patch
(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.
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
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
(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.
Comment on attachment 234580 [details] Patch Clearing flags on attachment: 234580 Committed r170949: <http://trac.webkit.org/changeset/170949>
All reviewed patches have been landed. Closing bug.