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

[BUG] request_correlation_header not normalized #295

Closed
kivra-kenand opened this issue Dec 9, 2024 · 1 comment · Fixed by #296
Closed

[BUG] request_correlation_header not normalized #295

kivra-kenand opened this issue Dec 9, 2024 · 1 comment · Fixed by #296
Assignees
Labels
bug Something isn't working

Comments

@kivra-kenand
Copy link

Describe the bug
Setting request_correlation_header with uppercase characters causes it to never match

If this is a complex bug
sys.config:

...
 #{request_correlation_header => <<"custom-X-id">>
...

SUITE:

Headers = #{headers => #{"content-type" => "application/json", <<"custom-X-id">> => <<"foo">>}},
#{status := {201, _}, headers := Res} = jhn_shttpc:post(["http://custom_url"], <<"[]">>, Headers),
?assertEqual(<<"foo">>, maps:get(<<"x-correlation-id">>, Res)).

The code here will never match custom-X-id as it has been normalized to custom-x-id.

Expected behavior
request_correlation_header should be normalized before matching. So that request_correlation_header => <<"cUsToM-X-iD">> would match CuStOm-x-Id in the headers.

Desktop (please complete the following information):

  • OS: N/A
  • Erlang version: 27
  • Nova version: v0.10.2
@burbas
Copy link
Contributor

burbas commented Dec 9, 2024

Thanks for reporting the issue. It's been fixed with the pull request mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants