[WK2] Responses with 302 HTTP Status Code should not be cached
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2015 02:18:10 +0000 (02:18 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2015 02:18:10 +0000 (02:18 +0000)
commit217c5e210f315e11d64f78e4988ca7bc6711dd0e
tree1bcd295f506fca46d4667b9e11cb5b2e167c1717
parent4ce5866d0fbe14448757b82c764cad1a3fffc795
[WK2] Responses with 302 HTTP Status Code should not be cached
https://bugs.webkit.org/show_bug.cgi?id=143028
<rdar://problem/19714040>

Reviewed by Antti Koivisto.

Source/WebKit2:

Responses with 302 HTTP Status Code should not be cached as per
RFC 7231:
http://tools.ietf.org/html/rfc7231#section-6.1

This patch updates our disk cache policy accordingly.

Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canStore):

LayoutTests:

Add layout test to check that responses with 302 HTTP Status Code
are not cached.

* http/tests/cache/disk-cache/disk-cache-302-status-code-expected.txt: Added.
* http/tests/cache/disk-cache/disk-cache-302-status-code.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/cache/disk-cache/disk-cache-302-status-code-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/cache/disk-cache/disk-cache-302-status-code.html [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp