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

fetch: add docs on why forbidden header names are not supported #3696

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Oct 7, 2024

This relates to...

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

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in comments, @KhafraDev ptal

@KhafraDev
Copy link
Member

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.

@trivikr
Copy link
Member Author

trivikr commented Oct 7, 2024

The benefit is for developers who read the code on while going through the implementation.

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 7, 2024

Why do we deviate from the spec?

image

@trivikr
Copy link
Member Author

trivikr commented Oct 7, 2024

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

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not land per my comment

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

Successfully merging this pull request may close these issues.

4 participants