Bug 134681 - [Curl] Cache entry invalidated too early.
Summary: [Curl] Cache entry invalidated too early.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Curl
Depends on:
Blocks:
 
Reported: 2014-07-07 08:44 PDT by peavo
Modified: 2014-07-09 20:11 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.02 KB, patch)
2014-07-07 08:53 PDT, peavo
no flags Details | Formatted Diff | Diff
Patch (2.86 KB, patch)
2014-07-08 12:13 PDT, peavo
no flags Details | Formatted Diff | Diff
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 Details

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 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).
Comment 1 peavo 2014-07-07 08:53:54 PDT
Created attachment 234489 [details]
Patch
Comment 2 Alex Christensen 2014-07-07 23:24:18 PDT
Comment on attachment 234489 [details]
Patch

Looks good to me, except now CurlCacheManager::isCached needs a const.
Comment 3 peavo 2014-07-08 12:13:19 PDT
Created attachment 234580 [details]
Patch
Comment 4 peavo 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.
Comment 5 Build Bot 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
Comment 6 Build Bot 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
Comment 7 peavo 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.
Comment 8 WebKit Commit Bot 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>
Comment 9 WebKit Commit Bot 2014-07-09 20:11:51 PDT
All reviewed patches have been landed.  Closing bug.