Responses with 404 HTTP Status Code should be cacheable by default according to RFC 7231: """ A 404 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see Section 4.2.2 of [RFC7234]). """ [1] [1] http://tools.ietf.org/html/rfc7231#section-6.5.4 The new WebKit Network cache does not currently cache these, even if Cache-Control headers allow us to do so.
<rdar://problem/20280310>
Created attachment 249343 [details] Patch
Comment on attachment 249343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249343&action=review > LayoutTests/http/tests/cache/disk-cache/disk-cache-404-status-code.html:21 > +var testMatrix = > +[ > + [ > + { responseHeaders: {'Status': '404', 'Cache-control': 'max-age=0' } }, > + { responseHeaders: {'Status': '404', 'Cache-control': 'max-age=100' } }, > + ], > + ]; > + > +description("Test that responses with HTTP status code 404 are cacheable"); > + > +var tests = generateTests(testMatrix); > + > +debug("running " + tests.length + " tests"); > +debug(""); > + > +runTests(tests); If you don't need permutations you can just define the tests as simple array and call runTests directly.
Created attachment 249347 [details] Patch
Comment on attachment 249347 [details] Patch Clearing flags on attachment: 249347 Committed r181904: <http://trac.webkit.org/changeset/181904>
All reviewed patches have been landed. Closing bug.