Bug 142979 - [WK2] NetworkCache retrievals fail for entries with no body
Summary: [WK2] NetworkCache retrievals fail for entries with no body
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-23 13:43 PDT by Chris Dumez
Modified: 2015-03-24 09:51 PDT (History)
5 users (show)

See Also:


Attachments
Patch (45.62 KB, patch)
2015-03-23 13:52 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-mavericks (623.11 KB, application/zip)
2015-03-23 14:11 PDT, Build Bot
no flags Details
Patch (50.51 KB, patch)
2015-03-23 14:19 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (44.28 KB, patch)
2015-03-24 09:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-03-23 13:43:13 PDT
NetworkCache retrievals fail for entries with no body because decodeEntry() doesn't correctly handle this case. In particular, the following check fails: "metaData.bodyOffset + metaData.bodySize == fileData.size()". This is because bodyOffset is pageSize-aligned.

As a result, the following resource on apple.com is stored in the cache but we fail to reuse it and reload it from the network every time:
http://images.apple.com/home/styles/promos.css
Comment 1 Radar WebKit Bug Importer 2015-03-23 13:43:31 PDT
<rdar://problem/20264100>
Comment 2 Chris Dumez 2015-03-23 13:52:06 PDT
Created attachment 249263 [details]
Patch
Comment 3 Build Bot 2015-03-23 14:11:44 PDT
Comment on attachment 249263 [details]
Patch

Attachment 249263 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6306153034153984

New failing tests:
http/tests/cache/disk-cache-validation-no-body.html
Comment 4 Build Bot 2015-03-23 14:11:50 PDT
Created attachment 249269 [details]
Archive of layout-test-results from ews101 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 5 Chris Dumez 2015-03-23 14:19:39 PDT
Created attachment 249272 [details]
Patch
Comment 6 Chris Dumez 2015-03-24 09:50:29 PDT
Created attachment 249332 [details]
Patch
Comment 7 Chris Dumez 2015-03-24 09:51:34 PDT
Comment on attachment 249332 [details]
Patch

Clearing flags on attachment: 249332

Committed r181895: <http://trac.webkit.org/changeset/181895>
Comment 8 Chris Dumez 2015-03-24 09:51:41 PDT
All reviewed patches have been landed.  Closing bug.