Forbid wildcard in content_type_provided
benjamin-bergia opened this issue · comments
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.