[webkit-changes] [WebKit/WebKit] d0c370: Make Fetch formData() consume multipart/form-data ...

sideshowbarker noreply at github.com
Tue Oct 10 09:12:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d0c370d532ad81f76fa32c14ec646eb56e91025b
      https://github.com/WebKit/WebKit/commit/d0c370d532ad81f76fa32c14ec646eb56e91025b
  Author: Michael[tm] Smith <mike at w3.org>
  Date:   2023-10-10 (Tue, 10 Oct 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.js
    M LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.worker-expected.txt
    M Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp

  Log Message:
  -----------
  Make Fetch formData() consume multipart/form-data headers case-insensitively
https://bugs.webkit.org/show_bug.cgi?id=262635

Reviewed by Youenn Fablet and Chris Dumez.

When consuming a Response body or Request body with formData() as
specified in https://fetch.spec.whatwg.org/#dom-body-formdata for a
multipart/form-data MIME type, Gecko and Blink consume the
Content-Disposition and Content-Type header names case-insensitively.
This change causes WebKit to do the same.

Otherwise, without this change, WebKit consumes those header names
case-sensitively — resulting in lack of interoperability for this
particular behavior across all current major engines.

* LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.js:
(promise_test.async t):
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.worker-expected.txt:
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::FetchBodyConsumer::packageFormData):

Canonical link: https://commits.webkit.org/269144@main




More information about the webkit-changes mailing list