Changeset 210853 in webkit


Ignore:
Timestamp:
Jan 18, 2017 10:37:30 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[Fetch API] Update content-type in case of form data
https://bugs.webkit.org/show_bug.cgi?id=167143

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-18
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/request-headers-expected.txt:

Source/WebCore:

Covered by rebased test.

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::extract): Adding a space to the content-type in case of form data.

LayoutTests:

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r210848 r210853  
     12017-01-18  Youenn Fablet  <youenn@apple.com>
     2
     3        [Fetch API] Update content-type in case of form data
     4        https://bugs.webkit.org/show_bug.cgi?id=167143
     5
     6        Reviewed by Alex Christensen.
     7
     8        * TestExpectations:
     9
    1102017-01-18  Antoine Quint  <graouts@apple.com>
    211
  • trunk/LayoutTests/TestExpectations

    r210848 r210853  
    312312webkit.org/b/161312 imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context.html [ Failure Pass ]
    313313
    314 # Flaky tests due to always changing assertion error message
    315 imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html [ Failure ]
    316 imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/url-encoded.html [ Failure ]
    317 
    318314[ Debug ] imported/w3c/web-platform-tests/fetch/api/basic/request-upload.html [ Skip ]
    319315[ Debug ] imported/w3c/web-platform-tests/fetch/api/basic/request-upload-worker.html [ Skip ]
     
    326322
    327323webkit.org/b/159724 imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-post-upload.htm [ Failure Pass ]
     324
     325# Flaky tests due to always changing assertion error message
     326imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/url-encoded.html [ Failure ]
    328327
    329328# New W3C ref tests that are failing.
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r210823 r210853  
     12017-01-18  Youenn Fablet  <youenn@apple.com>
     2
     3        [Fetch API] Update content-type in case of form data
     4        https://bugs.webkit.org/show_bug.cgi?id=167143
     5
     6        Reviewed by Alex Christensen.
     7
     8        * web-platform-tests/fetch/api/basic/request-headers-expected.txt:
     9
    1102017-01-17  Youenn Fablet  <youennf@gmail.com>
    211
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt

    r210823 r210853  
    66PASS Fetch with POST without body
    77PASS Fetch with POST with text body
    8 FAIL Fetch with POST with FormData body assert_true: Request should have header content-type starting with multipart/form-data; boundary=, but got multipart/form-data;boundary=----WebKitFormBoundary7HBc13pIcNoBV6R5 expected true got false
     8PASS Fetch with POST with FormData body
    99PASS Fetch with POST with URLSearchParams body
    1010FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) ""
  • trunk/Source/WebCore/ChangeLog

    r210851 r210853  
     12017-01-18  Youenn Fablet  <youenn@apple.com>
     2
     3        [Fetch API] Update content-type in case of form data
     4        https://bugs.webkit.org/show_bug.cgi?id=167143
     5
     6        Reviewed by Alex Christensen.
     7
     8        Covered by rebased test.
     9
     10        * Modules/fetch/FetchBody.cpp:
     11        (WebCore::FetchBody::extract): Adding a space to the content-type in case of form data.
     12
    1132017-01-18  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    214
  • trunk/Source/WebCore/Modules/fetch/FetchBody.cpp

    r209906 r210853  
    5858        auto& domFormData = *JSDOMFormData::toWrapped(value);
    5959        auto formData = FormData::createMultiPart(domFormData, domFormData.encoding(), &static_cast<Document&>(context));
    60         contentType = makeString("multipart/form-data;boundary=", formData->boundary().data());
     60        contentType = makeString("multipart/form-data; boundary=", formData->boundary().data());
    6161        return FetchBody(WTFMove(formData));
    6262    }
Note: See TracChangeset for help on using the changeset viewer.