[w3c/ServiceWorker] NavigationPreloadManager.setHeaderValue should reject invalid header values (PR #1827)

This update adds validation for the header value in NavigationPreloadManager.setHeaderValue() to match the Fetch specification's "header value" definition. It now:
1. Normalizes the input value (stripping HTTP whitespace).
2. Rejects the promise with a TypeError if the value contains invalid bytes (including \r, \n, or \0).

Fixes #1000


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/yoshisatoyanagisawa/ServiceWorker/pull/1827.html" title="Last updated on Jun 16, 2026, 4:50 AM UTC (3123a0c)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/ServiceWorker/1827/6de474f...yoshisatoyanagisawa:3123a0c.html" title="Last updated on Jun 16, 2026, 4:50 AM UTC (3123a0c)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/ServiceWorker/pull/1827

-- Commit Summary --

  * NavigationPreloadManager.setHeaderValue should reject invalid header values

-- File Changes --

    M index.bs (2)

-- Patch Links --

https://github.com/w3c/ServiceWorker/pull/1827.patch
https://github.com/w3c/ServiceWorker/pull/1827.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1827
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1827@github.com>

Received on Tuesday, 16 June 2026 04:51:17 UTC