mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +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) ->
|
||||
cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req);
|
||||
echo(Echo, Req) ->
|
||||
cowboy_req:reply(200,
|
||||
[{<<"content-encoding">>, <<"utf-8">>}], Echo, Req).
|
||||
cowboy_req:reply(200, [
|
||||
{<<"content-type">>, <<"text/plain; charset=utf-8">>}
|
||||
], Echo, Req).
|
||||
|
||||
terminate(_Reason, _Req, _State) ->
|
||||
ok.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue