Source

riak jiak.py client_id / apps / webmachine / src / webmachine_decision_core.erl

Diff from to

apps/webmachine/src/webmachine_decision_core.erl

 	    Reason = {none, none, []},
 	    {ErrorHTML,ReqState} = ErrorHandler:render_error(
                           Code, {webmachine_request,get(reqstate)}, Reason),
-            put(reqstate, ReqState), 
+            put(reqstate, ReqState),
             wrcall({set_resp_body, ErrorHTML});
         304 ->
             wrcall({remove_resp_header, "Content-Type"}),
     case Body of
         {stream, StreamBody} ->
             {stream, make_encoder_stream(Encoder, Charsetter, StreamBody)};
+        {writer, BodyFun} ->
+            {writer, {Encoder, Charsetter, BodyFun}};
         _ ->
             Encoder(Charsetter(iolist_to_binary(Body)))
     end.
 make_encoder_stream(Encoder, Charsetter, {Body, Next}) ->
     {Encoder(Charsetter(Body)),
      fun() -> make_encoder_stream(Encoder, Charsetter, Next()) end}.
-            
+
 choose_encoding(AccEncHdr) ->
     Encs = [Enc || {Enc,_Fun} <- resource_call(encodings_provided)],
     case webmachine_util:choose_encoding(Encs, AccEncHdr) of