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

minor refactor

This commit is contained in:
geeksilva97 2024-02-04 11:04:19 -03:00
parent ec6fc7d964
commit c37a6fba75

View file

@ -423,8 +423,7 @@ options(Req, State=#state{allowed_methods=Methods, method= <<"OPTIONS">>}) ->
Req2 = cowboy_req:set_resp_header(<<"allow">>, <<>>, Req),
respond(Req2, State, 200);
no_call ->
<< ", ", Allow/binary >>
= << << ", ", M/binary >> || M <- Methods >>,
Allow = stringify_allowed_methods(Methods),
Req2 = cowboy_req:set_resp_header(<<"allow">>, Allow, Req),
respond(Req2, State, 200);
{stop, Req2, State2} ->