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

Spec missing Headers.entries #60

Closed
syrusakbary opened this issue Nov 2, 2023 · 1 comment
Closed

Spec missing Headers.entries #60

syrusakbary opened this issue Nov 2, 2023 · 1 comment

Comments

@syrusakbary
Copy link

Headers.entries is implemented in some WinterCG runtimes (Deno Deploy & Cloudflare Workers) but is not in the spec.
Here's the example:

self.addEventListener('fetch', event => {
  let headers = event.request.headers;
  event.respondWith(new Response(`typeof headers.entries == "${typeof headers.entries}"`));
})

See related issue on WinterJS: wasmerio/winterjs#25 (comment)

Should entries be added to the spec so Cloudflare and Deno Deploy stay compliant with the spec and the rest of runtimes add support as well?

@jasnell
Copy link
Contributor

jasnell commented Dec 7, 2023

headers.entries is actually defined as a side of effect of the Headers object being defined as an iterable (https://webidl.spec.whatwg.org/#idl-iterable) so this is technically covered by the spec already... runtimes that support headers.entries (workerd, deno, node.js, etc) already compliant.

@jasnell jasnell closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants