aboutsummaryrefslogtreecommitdiffstats
path: root/examples/compress_response/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-10 17:15:02 +0200
committerLoïc Hoguin <[email protected]>2016-08-10 17:15:02 +0200
commite30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 (patch)
tree5eb48865b2ad61d3c05bdc0e3e1f639a6b966ffe /examples/compress_response/src
parentaa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac (diff)
downloadcowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.gz
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.bz2
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.zip
Make reply functions return Req
Diffstat (limited to 'examples/compress_response/src')
-rw-r--r--examples/compress_response/src/toppage_handler.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/compress_response/src/toppage_handler.erl b/examples/compress_response/src/toppage_handler.erl
index 4631f71..35a3b9c 100644
--- a/examples/compress_response/src/toppage_handler.erl
+++ b/examples/compress_response/src/toppage_handler.erl
@@ -5,7 +5,7 @@
-export([init/2]).
-init(Req, Opts) ->
+init(Req0, Opts) ->
BigBody =
<<"A cowboy is an animal herder who tends cattle on ranches in North America,
traditionally on horseback, and often performs a multitude of other ranch-
@@ -19,5 +19,5 @@ have established the ability to work at virtually identical tasks and obtained
considerable respect for their achievements. There are also cattle handlers
in many other parts of the world, particularly South America and Australia,
who perform work similar to the cowboy in their respective nations.\n">>,
- Req2 = cowboy_req:reply(200, [], BigBody, Req),
- {ok, Req2, Opts}.
+ Req = cowboy_req:reply(200, [], BigBody, Req0),
+ {ok, Req, Opts}.