Changeset 206855 in webkit


Ignore:
Timestamp:
Oct 6, 2016 1:30:01 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[WK2] 304 revalidation on the network process does not update the validated response
https://bugs.webkit.org/show_bug.cgi?id=162973

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-06
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/conditional-get-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/conditional-get.html: Added.
  • web-platform-tests/fetch/api/resources/cache.py: Added.

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp: Updating cache entry with the revalidated one.

LayoutTests:

  • http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header-expected.txt:

Rebasing expectation as memory cache revalidation is no longer needed now that the disk cache is updating the response passed to the memory cache.
The disk cache is doing revalidation on the second load. It receives the updated response with longer validity.
As the extended validity response is now passed to the memory cache, the memory cache revalidation no longer happens.

Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206854 r206855  
     12016-10-06  Youenn Fablet  <youenn@apple.com>
     2
     3        [WK2] 304 revalidation on the network process does not update the validated response
     4        https://bugs.webkit.org/show_bug.cgi?id=162973
     5
     6        Reviewed by Darin Adler.
     7
     8        * http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header-expected.txt:
     9        Rebasing expectation as memory cache revalidation is no longer needed now that the disk cache is updating the response passed to the memory cache.
     10        The disk cache is doing revalidation on the second load. It receives the updated response with longer validity.
     11        As the extended validity response is now passed to the memory cache, the memory cache revalidation no longer happens.
     12
    1132016-10-06  Nan Wang  <n_wang@apple.com>
    214
  • trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header-expected.txt

    r188468 r206855  
    1313response headers: {"Expires":"now(0)","ETag":"match"}
    1414response's 'Expires' header is overriden by future date in 304 response
    15 response source: Memory cache after validation
     15response source: Memory cache
    1616
    1717--------Testing loads through memory cache (subresource behavior)--------
    1818response headers: {"Expires":"now(0)","ETag":"match"}
    1919response's 'Expires' header is overriden by future date in 304 response
    20 response source: Memory cache after validation
     20response source: Memory cache
    2121
    2222304 response included an 'Expires' header in the future, so we should not need to revalidate this time.
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r206838 r206855  
     12016-10-06  Youenn Fablet  <youenn@apple.com>
     2
     3        [WK2] 304 revalidation on the network process does not update the validated response
     4        https://bugs.webkit.org/show_bug.cgi?id=162973
     5
     6        Reviewed by Darin Adler.
     7
     8        * web-platform-tests/fetch/api/basic/conditional-get-expected.txt: Added.
     9        * web-platform-tests/fetch/api/basic/conditional-get.html: Added.
     10        * web-platform-tests/fetch/api/resources/cache.py: Added.
     11
    1122016-10-05  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/Source/WebKit2/ChangeLog

    r206843 r206855  
     12016-10-06  Youenn Fablet  <youenn@apple.com>
     2
     3        [WK2] 304 revalidation on the network process does not update the validated response
     4        https://bugs.webkit.org/show_bug.cgi?id=162973
     5
     6        Reviewed by Darin Adler.
     7
     8        * NetworkProcess/NetworkResourceLoader.cpp: Updating cache entry with the revalidated one.
     9
    1102016-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
    211
  • trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

    r206762 r206855  
    326326        bool validationSucceeded = m_response.httpStatusCode() == 304; // 304 Not Modified
    327327        if (validationSucceeded) {
    328             NetworkCache::singleton().update(originalRequest(), { m_parameters.webPageID, m_parameters.webFrameID }, *m_cacheEntryForValidation, m_response);
    329             // If the request was conditional then this revalidation was not triggered by the network cache and we pass the
    330             // 304 response to WebCore.
     328            m_cacheEntryForValidation = NetworkCache::singleton().update(originalRequest(), { m_parameters.webPageID, m_parameters.webFrameID }, *m_cacheEntryForValidation, m_response);
     329            // If the request was conditional then this revalidation was not triggered by the network cache and we pass the 304 response to WebCore.
    331330            if (originalRequest().isConditional())
    332331                m_cacheEntryForValidation = nullptr;
Note: See TracChangeset for help on using the changeset viewer.