Skip to content

fix(http): normalize header keys to be case insensitive in RequestBuilder #654

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

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

Conversation

pxDot
Copy link
Contributor

@pxDot pxDot commented Jun 6, 2025

Summary of changes

Make header keys case insensitive in RequestBuilder.
This still has the potential issue of variable name casing not being respected though, so I'm not sure if there maybe is a better way to solve this. Maybe we need to also lowercase the keys while resolving the headers for the controller.

async controllerFunction(authorization: HttpHeader<string>) {...} // works even if sending a header with `Authorization` key via TestingFacade
async controllerFunction(Authorization: HttpHeader<string>) {...} // does not work (`Validation error:\nAuthorization(type): No value given`) as we are now lowercasing the keys

Potentially closes: #653

Relinquishment of Rights

Please mark following checkbox to confirm that you relinquish all rights of your changes:

  • I waive and relinquish all rights regarding this changes (including code, text, and images) to Deepkit UG (limited), Germany. This changes (including code, text, and images) are under MIT license without name attribution, copyright notice, and permission notice requirement.

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.

HttpHeader are case sensitive
1 participant