diff options
author | Loïc Hoguin <[email protected]> | 2013-02-09 15:38:35 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-02-09 15:38:35 +0100 |
commit | 574c3d490061fa4f8ddd3eb5c855abf5eab7b458 (patch) | |
tree | f72ee79ed20f1fe5cd8c39c2d739d97ba19e00a6 /examples/websocket/src/toppage_handler.erl | |
parent | efbd9133261e1aabf473f2f6f5ab4cbb36062481 (diff) | |
download | cowboy-574c3d490061fa4f8ddd3eb5c855abf5eab7b458.tar.gz cowboy-574c3d490061fa4f8ddd3eb5c855abf5eab7b458.tar.bz2 cowboy-574c3d490061fa4f8ddd3eb5c855abf5eab7b458.zip |
Improve Websocket example
Diffstat (limited to 'examples/websocket/src/toppage_handler.erl')
-rw-r--r-- | examples/websocket/src/toppage_handler.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/websocket/src/toppage_handler.erl b/examples/websocket/src/toppage_handler.erl index 63099b0..b315a19 100644 --- a/examples/websocket/src/toppage_handler.erl +++ b/examples/websocket/src/toppage_handler.erl @@ -11,7 +11,9 @@ init(_Transport, Req, []) -> handle(Req, State) -> Html = get_html(), - {ok, Req2} = cowboy_req:reply(200, [], Html, Req), + {ok, Req2} = cowboy_req:reply(200, + [{<<"content-type">>, <<"text/html">>}], + Html, Req), {ok, Req2, State}. terminate(_Reason, _Req, _State) -> |