cloudflare / cloudflare/workerd

Response.headers must be immutable

Open
#4,974 0 comments 0 reactions 1 assignee Claimed by @jasnell View on GitHub
wpt-conformance
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

WPT expects:
- ❌ Response.headers.append should throw TypeError (we don't throw anything)
- ✅ Response.headers.get should not return the added header (we do this correctly)

Something seems whacky to me about the way we implemented immutability. If I print out a `Headers` object from a Response, I see:

```
Headers(1) {
'content-type' => 'text/plain;charset=UTF-8',
[immutable]: false
}
```

Seems sus?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.