aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_rest.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-01-03 23:26:01 +0100
committerLoïc Hoguin <[email protected]>2012-01-03 23:39:45 +0100
commitbd8f31ed07f50d924788cb196fb4184accbfc4a2 (patch)
tree75984e557fe642dc3e2e74b8a0ae2e1c14c46aa3 /src/cowboy_http_rest.erl
parent063f64a02a398336cdac08f3394905fd378adf60 (diff)
parent89870b22d9a27e40407ed037258b8b7dbf73aefa (diff)
downloadcowboy-bd8f31ed07f50d924788cb196fb4184accbfc4a2.tar.gz
cowboy-bd8f31ed07f50d924788cb196fb4184accbfc4a2.tar.bz2
cowboy-bd8f31ed07f50d924788cb196fb4184accbfc4a2.zip
Merge branch 'static-handler-split' of https://github.com/klaar/cowboy
Diffstat (limited to 'src/cowboy_http_rest.erl')
-rw-r--r--src/cowboy_http_rest.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cowboy_http_rest.erl b/src/cowboy_http_rest.erl
index e825a98..a5333fe 100644
--- a/src/cowboy_http_rest.erl
+++ b/src/cowboy_http_rest.erl
@@ -748,7 +748,12 @@ set_resp_body(Req=#http_req{method=Method},
case call(Req5, State4, Fun) of
{Body, Req6, HandlerState} ->
State5 = State4#state{handler_state=HandlerState},
- {ok, Req7} = cowboy_http_req:set_resp_body(Body, Req6),
+ {ok, Req7} = case Body of
+ {stream, Len, Fun1} ->
+ cowboy_http_req:set_resp_body_fun(Len, Fun1, Req6);
+ _Contents ->
+ cowboy_http_req:set_resp_body(Body, Req6)
+ end,
multiple_choices(Req7, State5)
end;
set_resp_body(Req, State) ->