diff options
author | Loïc Hoguin <[email protected]> | 2016-06-13 16:26:00 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-13 16:26:00 +0200 |
commit | 6f75598b70801bbfb6828e5367bc7ed7477ad915 (patch) | |
tree | eabd6bdb5a0738b1f616aefdda718c3fedff2423 /examples/chunked_hello_world/src/toppage_handler.erl | |
parent | b82bb92f7e6cf751ec74fc8aec0bfea84bfc5415 (diff) | |
download | cowboy-6f75598b70801bbfb6828e5367bc7ed7477ad915.tar.gz cowboy-6f75598b70801bbfb6828e5367bc7ed7477ad915.tar.bz2 cowboy-6f75598b70801bbfb6828e5367bc7ed7477ad915.zip |
Fix chunked_hello_world example
Diffstat (limited to 'examples/chunked_hello_world/src/toppage_handler.erl')
-rw-r--r-- | examples/chunked_hello_world/src/toppage_handler.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/chunked_hello_world/src/toppage_handler.erl b/examples/chunked_hello_world/src/toppage_handler.erl index cb1d130..22e52b9 100644 --- a/examples/chunked_hello_world/src/toppage_handler.erl +++ b/examples/chunked_hello_world/src/toppage_handler.erl @@ -6,10 +6,10 @@ -export([init/2]). init(Req, Opts) -> - Req2 = cowboy_req:chunked_reply(200, Req), - cowboy_req:chunk("Hello\r\n", Req2), + cowboy_req:chunked_reply(200, Req), + cowboy_req:chunk("Hello\r\n", Req), timer:sleep(1000), - cowboy_req:chunk("World\r\n", Req2), + cowboy_req:chunk("World\r\n", Req), timer:sleep(1000), - cowboy_req:chunk("Chunked!\r\n", Req2), - {ok, Req2, Opts}. + cowboy_req:chunk("Chunked!\r\n", Req), + {ok, Req, Opts}. |