Closed Bug 1794342 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 36359 - fix(mimesniff): normalize input in isByteCompatible

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox108 fixed)

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 36359 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36359
Details from upstream follow.

Marcos Casagrande <marcoscvp90@gmail.com> wrote:

fix(mimesniff): normalize input in isByteCompatible

This PR normalizes the header value before checking if it's invalid.

The test expects a TypeError for the following values
https://github.com/web-platform-tests/wpt/blob/5e9bb795bc7c57a07ee258f362e50c4014108530/mimesniff/mime-types/resources/generated-mime-types.json#L194-L201

While those values are invalid headers, AFAIK the spec states that the header value should be normalized. Currently, those values can be appended to a Headers object in all browsers I've tested, and they get normalized to x/ and /x

Attached file Notable wpt changes
# CI Results Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI Total 3 tests and 1898 subtests ## Status Summary ### Firefox `OK` : 3 `PASS` : 2594 `FAIL` : 1243 ### Chrome `OK` : 3 `PASS` : 1462 `FAIL` : 2375 ### Safari `OK` : 2 `PASS` : 1421 `FAIL` : 2411 `TIMEOUT`: 6 ## Links [Gecko CI (Treeherder)](https://treeherder.mozilla.org/#/jobs?repo=try&revision=56b188ac9f2518f27f3e09c72595a47214a4b987) [GitHub PR Head](https://wpt.fyi/results/?sha=fd1a7f3eafda9fa1978e47171401089a34396750&label=pr_head) [GitHub PR Base](https://wpt.fyi/results/?sha=fd1a7f3eafda9fa1978e47171401089a34396750&label=pr_base) ## Details ### Firefox-only Failures * [/mimesniff/mime-types/charset-parameter.window.html](https://wpt.live/mimesniff/mime-types/charset-parameter.window.html) [[wpt.fyi](https://wpt.fyi/results/mimesniff/mime-types/charset-parameter.window.html)] * text/html;charset=gbk(: `FAIL` * text/html;charset=gbk;charset=windows-1255: `FAIL` * text/html;charset=();charset=GBK: `FAIL` * text/html;charset=gbk: `FAIL` * text/html;charset=';charset=GBK: `FAIL` * text/html;";charset=gbk: `FAIL` (See attachment for full changes)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ee188b6b3c1 [wpt PR 36359] - fix(mimesniff): normalize input in isByteCompatible, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: