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:
parent
299c93f661
commit
7ab12d1b66
1 changed files with 3 additions and 2 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue