deepkit-framework
                                
                                
                                
                                    deepkit-framework copied to clipboard
                            
                            
                            
                        HttpHeader are case sensitive when used in TestingFacade requests
Using HttpHeader as controller param seems to be case sensitive but should be case insensitive.
Seems to only be an issue when sending requests via a TestingFacade app.
@http.POST('testcontrollerfunction')
async testControllerFunction(authorization: HttpHeader<string>): Promise<{ data: string }> {
  return new JSONResponse({ data: authorization });
}
test('header should not be case sensitive', async () => {
  const response = await testApp.request(HttpRequest.POST('/testcontrollerfunction').header('Authorization', 'teststring'));
  assert.strictEqual((await response.json).data, 'teststring'); // fails
  const response2 = await testApp.request(HttpRequest.POST('/testcontrollerfunction').header('authorization', 'teststring'));
  assert.strictEqual((await response.json).data, 'teststring'); // OK
});