diff options
author | Loïc Hoguin <[email protected]> | 2016-04-30 14:58:32 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-04-30 14:58:32 +0200 |
commit | 25912dfc05e45e0f4453f689410fce80a1af69ab (patch) | |
tree | 755e76bf24752c4b9e212531f6fafdfd3e114346 /examples/ssl_hello_world/src | |
parent | ff936ff0ee62731d54ec35335355f76577044443 (diff) | |
download | cowboy-25912dfc05e45e0f4453f689410fce80a1af69ab.tar.gz cowboy-25912dfc05e45e0f4453f689410fce80a1af69ab.tar.bz2 cowboy-25912dfc05e45e0f4453f689410fce80a1af69ab.zip |
Fix ssl_hello_world example; document HTTP/2 output
Diffstat (limited to 'examples/ssl_hello_world/src')
-rw-r--r-- | examples/ssl_hello_world/src/ssl_hello_world_app.erl | 2 | ||||
-rw-r--r-- | examples/ssl_hello_world/src/toppage_handler.erl | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/ssl_hello_world/src/ssl_hello_world_app.erl b/examples/ssl_hello_world/src/ssl_hello_world_app.erl index 0338baf..ba42b24 100644 --- a/examples/ssl_hello_world/src/ssl_hello_world_app.erl +++ b/examples/ssl_hello_world/src/ssl_hello_world_app.erl @@ -22,7 +22,7 @@ start(_Type, _Args) -> {cacertfile, PrivDir ++ "/ssl/cowboy-ca.crt"}, {certfile, PrivDir ++ "/ssl/server.crt"}, {keyfile, PrivDir ++ "/ssl/server.key"} - ], #{env, [{dispatch, Dispatch}]}), + ], #{env => #{dispatch => Dispatch}}), ssl_hello_world_sup:start_link(). stop(_State) -> diff --git a/examples/ssl_hello_world/src/toppage_handler.erl b/examples/ssl_hello_world/src/toppage_handler.erl index e8e672e..eb95bf3 100644 --- a/examples/ssl_hello_world/src/toppage_handler.erl +++ b/examples/ssl_hello_world/src/toppage_handler.erl @@ -6,7 +6,7 @@ -export([init/2]). init(Req, Opts) -> - Req2 = cowboy_req:reply(200, [ - {<<"content-type">>, <<"text/plain">>} - ], <<"Hello world!">>, Req), - {ok, Req2, Opts}. + cowboy_req:reply(200, #{ + <<"content-type">> => <<"text/plain">> + }, <<"Hello world!">>, Req), + {ok, Req, Opts}. |