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

Fix wrong header sent in echo_post example

This commit is contained in:
Loïc Hoguin 2013-09-07 14:13:51 +02:00
parent 299c93f661
commit 7ab12d1b66

View file

@ -29,8 +29,9 @@ maybe_echo(_, _, Req) ->
echo(undefined, Req) -> echo(undefined, Req) ->
cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req); cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req);
echo(Echo, Req) -> echo(Echo, Req) ->
cowboy_req:reply(200, cowboy_req:reply(200, [
[{<<"content-encoding">>, <<"utf-8">>}], Echo, Req). {<<"content-type">>, <<"text/plain; charset=utf-8">>}
], Echo, Req).
terminate(_Reason, _Req, _State) -> terminate(_Reason, _Req, _State) ->
ok. ok.