cloudflare / cloudflare/workerd

Headers iterator must allow modification during iteration

Open
#4,790 0 comments 0 reactions 0 assignees View on GitHub
wpt-conformance
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

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.