undici
undici copied to clipboard
fetch: add docs on why forbidden header names are not supported
This relates to...
- Comment https://github.com/nodejs/undici/pull/3695#pullrequestreview-2350953699
- Fetch spec https://fetch.spec.whatwg.org/#concept-headers-append
Changes
Documents why undici fetch does not support forbidden header names
Features
N/A
Bug Fixes
N/A
Breaking Changes and Deprecations
N/A
Status
- [x] I have read and agreed to the Developer's Certificate of Origin
- [ ] Tested
- [ ] Benchmarked (optional)
- [ ] Documented
- [ ] Review ready
- [ ] In review
- [ ] Merge ready
I find the comments harder to read considering it merges two different spec functions (I understand they're out of date). I don't see any value in documenting why we don't implement forbidden headers either as it's well-known and documented already.
The benefit is for developers who read the code on while going through the implementation.
Why do we deviate from the spec?
The source code is for https://fetch.spec.whatwg.org/#concept-headers-append The link is provided in "relates to" section, as well as existing documentation, i.e. line 83, in the source code.
The screenshot provided is for https://fetch.spec.whatwg.org/#headers-class