Permalink
Browse files

Circumvent chunked encoding in case of single range

  • Loading branch information...
shino committed Feb 6, 2013
1 parent d94a07e commit 03ec5d42ad3859752bd60d77920056a8bb04bd33
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/webmachine_request.erl
@@ -588,7 +588,8 @@ parts_to_body([{Start, End, Body0}], Size) ->
mochiweb_util:make_io(End),
"/", mochiweb_util:make_io(Size)]}],
Body = if is_function(Body0) ->
- {stream, Body0(Start, End)};
+ {BodyBin, done} = Body0(Start, End),
+ BodyBin;
true ->
Body0
end,

0 comments on commit 03ec5d4

Please sign in to comment.