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

Add set_resp_headers_list #1634

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

geeksilva97
Copy link
Contributor

This PR addresses #1295

@@ -366,6 +367,30 @@ uri2_test() ->
<<"http://localhost/path?dummy=2785">> = iolist_to_binary(uri(Req, #{port => 80})),
<<"https://localhost/path?dummy=2785">> = iolist_to_binary(uri(Req, #{scheme => "https", port => 443})),
ok.

resp_headers_test() ->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not needed we can remove this unit test. I was using it to validate the function behavior.

set_resp_headers_list([], Map, Req) ->
set_resp_headers(Map, Req);

set_resp_headers_list([{<<"set-cookie">>, _} | Headers], Map, Req) ->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@essen I wonder if to have some consistency with the set_resp_header we should instead throw an error. What do you say?

@geeksilva97 geeksilva97 marked this pull request as ready for review April 19, 2024 13:39
@geeksilva97
Copy link
Contributor Author

Integration tests will be added soon. I would like to get your thoughts first, @essen

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

1 participant