aboutsummaryrefslogtreecommitdiffstats
path: root/examples/echo_get/src/toppage_handler.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-09-07 22:26:40 +0200
committerLoïc Hoguin <[email protected]>2013-09-07 22:26:40 +0200
commite2b11bbeedc0f7114910bb04bcb842d25e789427 (patch)
treed0e00d9758a04ea9f88b9357d07d9f0da768947b /examples/echo_get/src/toppage_handler.erl
parent340f0a51123b476bca765b87d3f36411e896b5e3 (diff)
downloadcowboy-e2b11bbeedc0f7114910bb04bcb842d25e789427.tar.gz
cowboy-e2b11bbeedc0f7114910bb04bcb842d25e789427.tar.bz2
cowboy-e2b11bbeedc0f7114910bb04bcb842d25e789427.zip
Convert the GET echo example to a release
Diffstat (limited to 'examples/echo_get/src/toppage_handler.erl')
-rw-r--r--examples/echo_get/src/toppage_handler.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/echo_get/src/toppage_handler.erl b/examples/echo_get/src/toppage_handler.erl
index c604bae..1187dc6 100644
--- a/examples/echo_get/src/toppage_handler.erl
+++ b/examples/echo_get/src/toppage_handler.erl
@@ -19,8 +19,9 @@ handle(Req, State) ->
echo(<<"GET">>, undefined, Req) ->
cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req);
echo(<<"GET">>, 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);
echo(_, _, Req) ->
%% Method not allowed.
cowboy_req:reply(405, Req).