Browse Source

Fix wrong header sent in echo_post example

Loïc Hoguin 11 years ago
parent
commit
7ab12d1b66
1 changed files with 3 additions and 2 deletions
  1. 3 2
      examples/echo_post/src/toppage_handler.erl

+ 3 - 2
examples/echo_post/src/toppage_handler.erl

@@ -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.