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:
parent
1288e68f31
commit
ec6fc7d964
1 changed files with 0 additions and 5 deletions
|
@ -347,11 +347,6 @@ allowed_methods(Req, State=#state{method=Method}) ->
|
||||||
switch_handler(Switch, Req2, State2);
|
switch_handler(Switch, Req2, State2);
|
||||||
{List, Req2, State2} ->
|
{List, Req2, State2} ->
|
||||||
case lists:member(Method, List) of
|
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 ->
|
true ->
|
||||||
Allow = stringify_allowed_methods(List),
|
Allow = stringify_allowed_methods(List),
|
||||||
Req3 = cowboy_req:set_resp_header(<<"allow">>, Allow, Req2),
|
Req3 = cowboy_req:set_resp_header(<<"allow">>, Allow, Req2),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue