cloudflare / cloudflare/workerd
Headers iterator must allow modification during iteration
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
The WPT test `headers/headers-basic.any.js` requires us to implement the following capabilities:
- Iteration skips elements removed while iterating
- Removing elements already iterated over causes an element to be skipped during iteration
- Appending a value pair during iteration causes it to be reached during iteration
- Prepending a value pair before the current element position causes it to be skipped during iteration and adds the current element a second time
We can't currently do this because our iterator just works on a copy of the header list. We need a 'live' iterator with a cursor instead, in order to match expected behaviour.
Contributor guide
Assessment
This issue has not been assessed yet.