0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

removed unused case from allowed_methods callback

This commit is contained in:
geeksilva97 2024-02-04 11:01:53 -03:00
parent 1288e68f31
commit ec6fc7d964

View file

@ -347,11 +347,6 @@ allowed_methods(Req, State=#state{method=Method}) ->
switch_handler(Switch, Req2, State2);
{List, Req2, State2} ->
case lists:member(Method, List) of
true when Method =:= <<"OPTIONS">> ->
Allow = stringify_allowed_methods(List),
Req3 = cowboy_req:set_resp_header(<<"allow">>, Allow, Req2),
next(Req3, State2#state{allowed_methods=List},
fun malformed_request/2);
true ->
Allow = stringify_allowed_methods(List),
Req3 = cowboy_req:set_resp_header(<<"allow">>, Allow, Req2),