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

dup-keys-non-strings #3166

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JavaLavaMT
Copy link

This relates to #1902

Rationale

now throws an error if the headers key is not a string or duplicated

Changes

  • added Tests
  • added a guard for duplicate headers
  • added a guard for non string header keys

Breaking Changes and Deprecations

Not sure, but this will block ALL requests that have headers which are not of type 'String' or are duplicated.

Status

Co-authored-by: James1x0 <james@twox.io>
@ronag
Copy link
Member

ronag commented Apr 25, 2024

I think duplicate headers are allowed by the spec

@ronag
Copy link
Member

ronag commented Apr 25, 2024

Actually not sure what is correct here.

@James1x0
Copy link
Contributor

Co-authored-by: James1x0 <james@twox.io>
@JavaLavaMT
Copy link
Author

based on https://www.rfc-editor.org/rfc/rfc9110.html#name-field-lines-and-combined-fi

seems like keys CAN be duplicates as long as the values are an array. If i am understanding this correct, commit # 698e64e should fix this.

@metcoder95
Copy link
Member

The actual commit still seems to have the implementation that throws on duplicate, can we verify we change it?

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.

None yet

4 participants