Fix the headers option subtests in webtransport/headers.https.any.js
Categories
(Core :: Networking, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: jesup, Assigned: jesup)
References
Details
(Whiteboard: [necko-triaged], [wptsync upstream])
Attachments
(1 external file)
Three subtests in webtransport/headers.https.any.js (added for the headers option, bug 2081470) fail in Firefox because of problems in the tests, not in the implementation.
"Forbidden request-header names are silently dropped from the headers option": the test sends Cookie, Host, Sec-Fetch-Mode and Referer in the headers option and asserts that the server sees none of those headers at all. All four user-supplied values are dropped, as the spec's "request" guard requires. But the user agent sends its own Sec-Fetch-Mode (no-cors in Firefox) and may send its own Referer or Cookie, so asserting undefined fails. The test should assert that the user-supplied value is not forwarded.
"Duplicate header names in sequence form are all sent, in order" and "Header names differing only in case are lowercased and both sent": the tests require repeated headers to arrive as separate fields (['one', 'two']). Firefox sends one combined field, one, two. RFC 9110 section 5.3 allows a sender to combine repeated fields, and Fetch's header list does not require separate fields on the wire. The tests should accept either form and check the combined value and its order.
The fix changes the three tests to compare against the user-supplied value and to join repeated values before comparing, and removes the expected: FAIL entries for them from headers.https.any.js.ini. It should also be sent upstream to web-platform-tests.
| Assignee | ||
Comment 1•1 month ago
|
||
The forbidden-header test asserted that Cookie, Host, Referer and Sec-Fetch-Mode never reach the server, but a user agent legitimately sends its own Referer and Sec-Fetch-Mode. Assert that the user-supplied values are not forwarded instead.
The duplicate-header tests required each value in its own field. RFC 9110 section 5.3 allows a sender to combine repeated fields, so accept either form.
Remove headers.https.any.js.ini expectations for the three tests.
Updated•1 month ago
|
Comment 3•1 month ago
|
||
| bugherder | ||
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/63839 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Updated•28 days ago
|
Description
•