From f112af3933a9ddd0405802c0f3fa138d830116d7 Mon Sep 17 00:00:00 2001 From: Shunichi Shinohara Date: Tue, 12 Feb 2013 00:37:14 +0900 Subject: [PATCH] Respond without chunked encoding for single range --- src/webmachine_request.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webmachine_request.erl b/src/webmachine_request.erl index ba9b67dc..35b98895 100644 --- a/src/webmachine_request.erl +++ b/src/webmachine_request.erl @@ -627,7 +627,7 @@ parts_to_body([{Start, End, Body0}], Size, Req) -> mochiweb_util:make_io(End), "/", mochiweb_util:make_io(Size)]}], Body = if is_function(Body0) -> - {stream, Body0(Start, End)}; + {known_length_stream, End - Start + 1, Body0(Start, End)}; true -> Body0 end,