Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing wpts #1967

Merged
merged 3 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/fileapi/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

/**
* @see https://encoding.spec.whatwg.org/#concept-encoding-get
* @param {string} label
* @param {string|undefined} label
*/
function getEncoding (label) {
if (!label) {
return 'failure'
}

// 1. Remove any leading and trailing ASCII whitespace from label.
// 2. If label is an ASCII case-insensitive match for any of the
// labels listed in the table below, then return the
Expand Down
53 changes: 43 additions & 10 deletions test/wpt/status/fetch.status.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,54 @@
"Consume empty FormData request body as text"
]
},
"request-consume.any.js": {
"note": "TODO(@KhafraDev): investigate",
"fail": [
"Consume blob response's body as blob"
]
},
"request-disturbed.any.js": {
"note": "TODO(@KhafraDev): investigate",
"note": "this test fails in all other platforms - https://wpt.fyi/results/fetch/api/request/request-disturbed.any.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&product=deno&aligned&view=subtest",
"fail": [
"Input request used for creating new request became disturbed even if body is not used"
]
},
"request-headers.any.js": {
"note": "TODO(@KhafraDev): investigate",
"skip": true
"note": "undici doesn't filter headers",
"fail": [
"Adding invalid request header \"Accept-Charset: KO\"",
"Adding invalid request header \"accept-charset: KO\"",
"Adding invalid request header \"ACCEPT-ENCODING: KO\"",
"Adding invalid request header \"Accept-Encoding: KO\"",
"Adding invalid request header \"Access-Control-Request-Headers: KO\"",
"Adding invalid request header \"Access-Control-Request-Method: KO\"",
"Adding invalid request header \"Access-Control-Request-Private-Network: KO\"",
"Adding invalid request header \"Connection: KO\"",
"Adding invalid request header \"Content-Length: KO\"",
"Adding invalid request header \"Cookie: KO\"",
"Adding invalid request header \"Cookie2: KO\"",
"Adding invalid request header \"Date: KO\"",
"Adding invalid request header \"DNT: KO\"",
"Adding invalid request header \"Expect: KO\"",
"Adding invalid request header \"Host: KO\"",
"Adding invalid request header \"Keep-Alive: KO\"",
"Adding invalid request header \"Origin: KO\"",
"Adding invalid request header \"Referer: KO\"",
"Adding invalid request header \"Set-Cookie: KO\"",
"Adding invalid request header \"TE: KO\"",
"Adding invalid request header \"Trailer: KO\"",
"Adding invalid request header \"Transfer-Encoding: KO\"",
"Adding invalid request header \"Upgrade: KO\"",
"Adding invalid request header \"Via: KO\"",
"Adding invalid request header \"Proxy-: KO\"",
"Adding invalid request header \"proxy-a: KO\"",
"Adding invalid request header \"Sec-: KO\"",
"Adding invalid request header \"sec-b: KO\"",
"Adding invalid no-cors request header \"Content-Type: KO\"",
"Adding invalid no-cors request header \"Potato: KO\"",
"Adding invalid no-cors request header \"proxy: KO\"",
"Adding invalid no-cors request header \"proxya: KO\"",
"Adding invalid no-cors request header \"sec: KO\"",
"Adding invalid no-cors request header \"secb: KO\"",
"Adding invalid no-cors request header \"Empty-Value: \"",
"Check that request constructor is filtering headers provided as init parameter",
"Check that no-cors request constructor is filtering headers provided as init parameter",
"Check that no-cors request constructor is filtering headers provided as part of request parameter"
]
},
"request-init-priority.any.js": {
"note": "undici doesn't implement priority hints, yet(?)",
Expand Down Expand Up @@ -338,7 +371,7 @@
]
},
"response-stream-with-broken-then.any.js": {
"note": "TODO(@KhafraDev): either requires primordials or a bug in node core",
"note": "this is a bug in webstreams, see https://github.com/nodejs/node/issues/46786",
"skip": true
}
}
Expand Down