⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287760 in webkit


Ignore:
Timestamp:
Jan 7, 2022, 10:44:50 AM (5 years ago)
Author:
youenn@apple.com
Message:

Allow storing form data responses in Cache Storage
https://bugs.webkit.org/show_bug.cgi?id=234881

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt:

Source/WebCore:

Covered by rebased tests.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::put):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r287742 r287760  
     12022-01-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Allow storing form data responses in Cache Storage
     4        https://bugs.webkit.org/show_bug.cgi?id=234881
     5
     6        Reviewed by Alex Christensen.
     7
     8        * web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt:
     9
    1102022-01-07  Martin Robinson  <mrobinson@webkit.org>
    211
  • trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt

    r279389 r287760  
    2525PASS Cache.put should store Response.redirect() correctly
    2626PASS Cache.put called with simple Request and blob Response
    27 FAIL Cache.put called with simple Request and form data Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented"
     27PASS Cache.put called with simple Request and form data Response
    2828
  • trunk/Source/WebCore/ChangeLog

    r287759 r287760  
     12022-01-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Allow storing form data responses in Cache Storage
     4        https://bugs.webkit.org/show_bug.cgi?id=234881
     5
     6        Reviewed by Alex Christensen.
     7
     8        Covered by rebased tests.
     9
     10        * Modules/cache/DOMCache.cpp:
     11        (WebCore::DOMCache::put):
     12
    1132022-01-07  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Source/WebCore/Modules/cache/DOMCache.cpp

    r287532 r287760  
    366366    }
    367367
    368     if (response->isBlobFormData()) {
    369         promise.reject(Exception { NotSupportedError, "Not implemented"_s });
    370         return;
    371     }
    372 
    373     // FIXME: for efficiency, we should load blobs directly instead of going through the readableStream path.
    374     if (response->isBlobBody()) {
     368    // FIXME: for efficiency, we should load blobs/form data directly instead of going through the readableStream path.
     369    if (response->isBlobBody() || response->isBlobFormData()) {
    375370        auto streamOrException = response->readableStream(*scriptExecutionContext()->globalObject());
    376371        if (UNLIKELY(streamOrException.hasException())) {
Note: See TracChangeset for help on using the changeset viewer.