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

Forbid wildcard in content_type_provided #1598

Open
benjamin-bergia opened this issue Jan 30, 2023 · 0 comments
Open

Forbid wildcard in content_type_provided #1598

benjamin-bergia opened this issue Jan 30, 2023 · 0 comments

Comments

@benjamin-bergia
Copy link

I wrote a small rest handler using cowboy 2.9.0 for testing purpose and I ended up with this code in it:

content_types_provided(Req, State) ->
  {[
    {{'*', '*', '*'}, to_plain_text}
  ], Req, State}.

I didn't get any error or warning when running this code. But all the requests hang and timeout.
When checking the console I see the following:

=ERROR REPORT==== 30-Jan-2023::14:40:54.876256 ===
Bad value on output port 'tcp_inet'

I don't think {'*', '*', '*'} this is valid and it shouldn't work but it would be nice if this could fail earlier somehow and/or with a better error.

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

No branches or pull requests

1 participant