diff --git a/components/script/body.rs b/components/script/body.rs index 20c6e1052a3..ec51a7fe0ea 100644 --- a/components/script/body.rs +++ b/components/script/body.rs @@ -539,7 +539,7 @@ impl Extractable for FormData { let bytes = encode_multipart_form_data(&mut self.datums(), boundary.clone(), UTF_8); let total_bytes = bytes.len(); let content_type = Some(DOMString::from(format!( - "multipart/form-data;boundary={}", + "multipart/form-data; boundary={}", boundary ))); let stream = ReadableStream::new_from_bytes(global, bytes, can_gc)?; diff --git a/tests/wpt/meta/fetch/api/basic/request-headers.any.js.ini b/tests/wpt/meta/fetch/api/basic/request-headers.any.js.ini index e3b527a93a9..e9339a86d21 100644 --- a/tests/wpt/meta/fetch/api/basic/request-headers.any.js.ini +++ b/tests/wpt/meta/fetch/api/basic/request-headers.any.js.ini @@ -5,16 +5,10 @@ expected: ERROR [request-headers.any.html] - [Fetch with POST with FormData body] - expected: FAIL - [Fetch with POST with Float16Array body] expected: FAIL [request-headers.any.worker.html] - [Fetch with POST with FormData body] - expected: FAIL - [Fetch with POST with Float16Array body] expected: FAIL diff --git a/tests/wpt/meta/fetch/api/request/request-init-contenttype.any.js.ini b/tests/wpt/meta/fetch/api/request/request-init-contenttype.any.js.ini deleted file mode 100644 index b1565a4387a..00000000000 --- a/tests/wpt/meta/fetch/api/request/request-init-contenttype.any.js.ini +++ /dev/null @@ -1,8 +0,0 @@ -[request-init-contenttype.any.worker.html] - [Default Content-Type for Request with FormData body] - expected: FAIL - - -[request-init-contenttype.any.html] - [Default Content-Type for Request with FormData body] - expected: FAIL diff --git a/tests/wpt/meta/fetch/api/response/response-consume.html.ini b/tests/wpt/meta/fetch/api/response/response-consume.html.ini index 0334fb9eab6..535ac79d5dc 100644 --- a/tests/wpt/meta/fetch/api/response/response-consume.html.ini +++ b/tests/wpt/meta/fetch/api/response/response-consume.html.ini @@ -16,3 +16,6 @@ [Consume response's body: from multipart form data blob to formData] expected: FAIL + + [Consume response's body: from FormData to blob] + expected: FAIL diff --git a/tests/wpt/meta/fetch/api/response/response-init-contenttype.any.js.ini b/tests/wpt/meta/fetch/api/response/response-init-contenttype.any.js.ini deleted file mode 100644 index e33088cb4f4..00000000000 --- a/tests/wpt/meta/fetch/api/response/response-init-contenttype.any.js.ini +++ /dev/null @@ -1,8 +0,0 @@ -[response-init-contenttype.any.worker.html] - [Default Content-Type for Response with FormData body] - expected: FAIL - - -[response-init-contenttype.any.html] - [Default Content-Type for Response with FormData body] - expected: FAIL diff --git a/tests/wpt/meta/fetch/content-length/api-and-duplicate-headers.any.js.ini b/tests/wpt/meta/fetch/content-length/api-and-duplicate-headers.any.js.ini index 446cc52f350..e4a70456126 100644 --- a/tests/wpt/meta/fetch/content-length/api-and-duplicate-headers.any.js.ini +++ b/tests/wpt/meta/fetch/content-length/api-and-duplicate-headers.any.js.ini @@ -6,3 +6,6 @@ [api-and-duplicate-headers.any.worker.html] [XMLHttpRequest and duplicate Content-Length/Content-Type headers] expected: FAIL + + [fetch() and duplicate Content-Length/Content-Type headers] + expected: FAIL diff --git a/tests/wpt/meta/xhr/setrequestheader-content-type.htm.ini b/tests/wpt/meta/xhr/setrequestheader-content-type.htm.ini index 70476943add..35bb7bb2a51 100644 --- a/tests/wpt/meta/xhr/setrequestheader-content-type.htm.ini +++ b/tests/wpt/meta/xhr/setrequestheader-content-type.htm.ini @@ -8,8 +8,5 @@ [HTML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8] expected: FAIL - [FormData request has correct default Content-Type of "multipart/form-data; boundary=_"] - expected: FAIL - [URLSearchParams request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8] expected: FAIL