deepkit-framework icon indicating copy to clipboard operation
deepkit-framework copied to clipboard

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

Open pxDot opened this issue 4 months ago • 0 comments

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:

  • [x] 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.

pxDot avatar Jun 06 '25 07:06 pxDot