Re: [whatwg/fetch] Handle `Unencoded-Digest` assertions. (PR #1867)

@annevk commented on this pull request.



> +algorithms, and whose values are <a data-lt="structured field byte sequence">byte sequences</a>
+represent a digest of the response produced via the specified algorithm. [[!UNENCODED-DIGEST]]
+
+
+<div algorithm>
+<p>To <dfn export>verify `<code>Unencoded-Digest</code>` assertions</dfn>, given a
+<a>byte sequence</a> <var>bytes</var> and a <a for=/>header list</a> <var>list</var>, run these
+steps:
+
+<ol>
+ <li><p>Let <var>header</var> be the result of
+ <a for="header list" lt="get a structured field value">getting</a> the
+ `<a http-header><code>Unencoded-Digest</code></a>` header as a "<code>dictionary</code>" from
+ <var>list</var>.
+
+ <li><p>If <var>header</var> is null, then return <b>verified</b>.

That would improve it, though I worry what happens when we suddenly need more than two values. I guess we switch to "success", "failure", "report", or some such at that point?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1867#discussion_r2541086757
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1867/review/3481516415@github.com>

Received on Wednesday, 19 November 2025 08:49:53 UTC