0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00
Conflicts:
	src/cowboy_rest.erl
This commit is contained in:
Loïc Hoguin 2013-01-29 22:27:50 +01:00
commit d9b3727a62
2 changed files with 2 additions and 2 deletions

View file

@ -793,7 +793,7 @@ choose_content_type(Req,
next(Req2, State2, OnTrue); next(Req2, State2, OnTrue);
{false, Req2, HandlerState2} -> {false, Req2, HandlerState2} ->
State2 = State#state{handler_state=HandlerState2}, State2 = State#state{handler_state=HandlerState2},
respond(Req2, State2, 500) respond(Req2, State2, 422)
end; end;
choose_content_type(Req, State, OnTrue, ContentType, [_Any|Tail]) -> choose_content_type(Req, State, OnTrue, ContentType, [_Any|Tail]) ->
choose_content_type(Req, State, OnTrue, ContentType, Tail). choose_content_type(Req, State, OnTrue, ContentType, Tail).

View file

@ -855,7 +855,7 @@ rest_nodelete(Config) ->
rest_patch(Config) -> rest_patch(Config) ->
Tests = [ Tests = [
{204, [{<<"content-type">>, <<"text/plain">>}], <<"whatever">>}, {204, [{<<"content-type">>, <<"text/plain">>}], <<"whatever">>},
{500, [{<<"content-type">>, <<"text/plain">>}], <<"false">>}, {422, [{<<"content-type">>, <<"text/plain">>}], <<"false">>},
{400, [{<<"content-type">>, <<"text/plain">>}], <<"halt">>}, {400, [{<<"content-type">>, <<"text/plain">>}], <<"halt">>},
{415, [{<<"content-type">>, <<"application/json">>}], <<"bad_content_type">>} {415, [{<<"content-type">>, <<"application/json">>}], <<"bad_content_type">>}
], ],