aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE_data
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-04-28 16:08:36 +0200
committerLoïc Hoguin <[email protected]>2013-04-28 16:08:36 +0200
commit83e8ebb9ff832017dd2d0fb6188e8e8a5602ff9c (patch)
tree3477eace0431df653d7498d6fde064e673da32ef /test/http_SUITE_data
parente54149555e1de41d356ee0ce7b5b0bb854170661 (diff)
parentc8242ab396db2fab7468fd5b0eaac54b5c8f3f39 (diff)
downloadcowboy-83e8ebb9ff832017dd2d0fb6188e8e8a5602ff9c.tar.gz
cowboy-83e8ebb9ff832017dd2d0fb6188e8e8a5602ff9c.tar.bz2
cowboy-83e8ebb9ff832017dd2d0fb6188e8e8a5602ff9c.zip
Merge branch 'chunked-set-resp-body-fun' of git://github.com/fishcakez/cowboy
Diffstat (limited to 'test/http_SUITE_data')
-rw-r--r--test/http_SUITE_data/http_stream_body.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/http_SUITE_data/http_stream_body.erl b/test/http_SUITE_data/http_stream_body.erl
index 4f45656..d896797 100644
--- a/test/http_SUITE_data/http_stream_body.erl
+++ b/test/http_SUITE_data/http_stream_body.erl
@@ -19,7 +19,11 @@ handle(Req, State=#state{headers=_Headers, body=Body, reply=Reply}) ->
SLen = iolist_size(Body),
cowboy_req:set_resp_body_fun(SLen, SFun, Req);
set_resp_close ->
- cowboy_req:set_resp_body_fun(SFun, Req)
+ cowboy_req:set_resp_body_fun(SFun, Req);
+ set_resp_chunked ->
+ %% Here Body should be a list of chunks, not a binary.
+ SFun2 = fun(SendFun) -> lists:foreach(SendFun, Body) end,
+ cowboy_req:set_resp_body_fun(chunked, SFun2, Req)
end,
{ok, Req3} = cowboy_req:reply(200, Req2),
{ok, Req3, State}.