Title: [210853] trunk
Revision
210853
Author
commit-qu...@webkit.org
Date
2017-01-18 10:37:30 -0800 (Wed, 18 Jan 2017)

Log Message

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

Patch by Youenn Fablet <you...@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:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (210852 => 210853)


--- trunk/LayoutTests/ChangeLog	2017-01-18 17:55:06 UTC (rev 210852)
+++ trunk/LayoutTests/ChangeLog	2017-01-18 18:37:30 UTC (rev 210853)
@@ -1,3 +1,12 @@
+2017-01-18  Youenn Fablet  <you...@apple.com>
+
+        [Fetch API] Update content-type in case of form data
+        https://bugs.webkit.org/show_bug.cgi?id=167143
+
+        Reviewed by Alex Christensen.
+
+        * TestExpectations:
+
 2017-01-18  Antoine Quint  <grao...@apple.com>
 
         [Modern Media Controls] Turn modern media controls on by default

Modified: trunk/LayoutTests/TestExpectations (210852 => 210853)


--- trunk/LayoutTests/TestExpectations	2017-01-18 17:55:06 UTC (rev 210852)
+++ trunk/LayoutTests/TestExpectations	2017-01-18 18:37:30 UTC (rev 210853)
@@ -311,10 +311,6 @@
 webkit.org/b/157145 imported/w3c/web-platform-tests/fetch/nosniff/stylesheet.html [ Failure Pass ]
 webkit.org/b/161312 imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context.html [ Failure Pass ]
 
-# Flaky tests due to always changing assertion error message
-imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html [ Failure ]
-imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/url-encoded.html [ Failure ]
-
 [ Debug ] imported/w3c/web-platform-tests/fetch/api/basic/request-upload.html [ Skip ]
 [ Debug ] imported/w3c/web-platform-tests/fetch/api/basic/request-upload-worker.html [ Skip ]
 
@@ -326,6 +322,9 @@
 
 webkit.org/b/159724 imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-post-upload.htm [ Failure Pass ]
 
+# Flaky tests due to always changing assertion error message
+imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/url-encoded.html [ Failure ]
+
 # New W3C ref tests that are failing.
 webkit.org/b/148856 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_initially_paused.html [ ImageOnlyFailure ]
 

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (210852 => 210853)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-01-18 17:55:06 UTC (rev 210852)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-01-18 18:37:30 UTC (rev 210853)
@@ -1,3 +1,12 @@
+2017-01-18  Youenn Fablet  <you...@apple.com>
+
+        [Fetch API] Update content-type in case of form data
+        https://bugs.webkit.org/show_bug.cgi?id=167143
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/fetch/api/basic/request-headers-expected.txt:
+
 2017-01-17  Youenn Fablet  <youe...@gmail.com>
 
          Refresh WPT tests up to 73f4ad361ca56d890b5f46d62c3bc84371a77e10

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt (210852 => 210853)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt	2017-01-18 17:55:06 UTC (rev 210852)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt	2017-01-18 18:37:30 UTC (rev 210853)
@@ -5,7 +5,7 @@
 PASS Fetch with PUT with body 
 PASS Fetch with POST without body 
 PASS Fetch with POST with text body 
-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
+PASS Fetch with POST with FormData body 
 PASS Fetch with POST with URLSearchParams body 
 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) ""
 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded"

Modified: trunk/Source/WebCore/ChangeLog (210852 => 210853)


--- trunk/Source/WebCore/ChangeLog	2017-01-18 17:55:06 UTC (rev 210852)
+++ trunk/Source/WebCore/ChangeLog	2017-01-18 18:37:30 UTC (rev 210853)
@@ -1,3 +1,15 @@
+2017-01-18  Youenn Fablet  <you...@apple.com>
+
+        [Fetch API] Update content-type in case of form data
+        https://bugs.webkit.org/show_bug.cgi?id=167143
+
+        Reviewed by Alex Christensen.
+
+        Covered by rebased test.
+
+        * Modules/fetch/FetchBody.cpp:
+        (WebCore::FetchBody::extract): Adding a space to the content-type in case of form data.
+
 2017-01-18  Gustavo Noronha Silva  <gustavo.noro...@collabora.co.uk>
 
         [GStreamer] media source tests crashing

Modified: trunk/Source/WebCore/Modules/fetch/FetchBody.cpp (210852 => 210853)


--- trunk/Source/WebCore/Modules/fetch/FetchBody.cpp	2017-01-18 17:55:06 UTC (rev 210852)
+++ trunk/Source/WebCore/Modules/fetch/FetchBody.cpp	2017-01-18 18:37:30 UTC (rev 210853)
@@ -57,7 +57,7 @@
         ASSERT(!context.isWorkerGlobalScope());
         auto& domFormData = *JSDOMFormData::toWrapped(value);
         auto formData = FormData::createMultiPart(domFormData, domFormData.encoding(), &static_cast<Document&>(context));
-        contentType = makeString("multipart/form-data;boundary=", formData->boundary().data());
+        contentType = makeString("multipart/form-data; boundary=", formData->boundary().data());
         return FetchBody(WTFMove(formData));
     }
     if (value.isString()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to