mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Merge branch 'patch-1' of https://github.com/CamShaft/cowboy
Conflicts: src/cowboy_rest.erl
This commit is contained in:
commit
d9b3727a62
2 changed files with 2 additions and 2 deletions
|
@ -793,7 +793,7 @@ choose_content_type(Req,
|
|||
next(Req2, State2, OnTrue);
|
||||
{false, Req2, HandlerState2} ->
|
||||
State2 = State#state{handler_state=HandlerState2},
|
||||
respond(Req2, State2, 500)
|
||||
respond(Req2, State2, 422)
|
||||
end;
|
||||
choose_content_type(Req, State, OnTrue, ContentType, [_Any|Tail]) ->
|
||||
choose_content_type(Req, State, OnTrue, ContentType, Tail).
|
||||
|
|
|
@ -855,7 +855,7 @@ rest_nodelete(Config) ->
|
|||
rest_patch(Config) ->
|
||||
Tests = [
|
||||
{204, [{<<"content-type">>, <<"text/plain">>}], <<"whatever">>},
|
||||
{500, [{<<"content-type">>, <<"text/plain">>}], <<"false">>},
|
||||
{422, [{<<"content-type">>, <<"text/plain">>}], <<"false">>},
|
||||
{400, [{<<"content-type">>, <<"text/plain">>}], <<"halt">>},
|
||||
{415, [{<<"content-type">>, <<"application/json">>}], <<"bad_content_type">>}
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue