anchor.diff:              MimeType = (RPState#revproxy.headers)#headers.content_type,
               Res ++ [{streamcontent, MimeType, Chunk}];
   
  -        {streamcontent_from_pid, Pid} ->
  +        {block, BlockCnt, BlockSz, LastBlock} ->
  +            GC  = get(gc),
  +            Pid = spawn(fun() ->
  +                                put(gc, GC),
  +                                receive
  +                                    {ok, YawsPid} ->
  +                                        recv_blocks(YawsPid, Arg, BlockCnt,
  +                                                    BlockSz, LastBlock);
  +                                    {discard, YawsPid} ->
  +                                        recv_blocks(YawsPid, Arg, 0, BlockSz, 0)
  +                                end
  +                        end),
               MimeType = (RPState#revproxy.headers)#headers.content_type,
               Res ++ [{streamcontent_from_pid, MimeType, Pid}];
   
  
positive.code: 
  %%==========================================================================
  %% This function reads blocks from the server and streams them to the client.
  recv_blocks(YawsPid, RPState, #arg{clisock=Sock}=Arg, 0, _BlockSize, LastBlock) ->
      case read(RPState, LastBlock) of
          {ok, Data} ->
              ?Debug("Response content received from the backend server : "
                     "~p bytes~n", [size(Data)]),
              ok = yaws_api:stream_process_deliver(Sock, Data),
              yaws_api:stream_process_end(Sock, YawsPid);
          {error, Reason} ->
              ?Debug("TCP error: ~p~n", [Reason]),
              case Reason of
                  closed ->
                      close(RPState),
                      yaws_api:stream_process_end(closed, YawsPid);
                  _ ->
                      yaws_api:stream_process_end(Arg#arg.clisock, YawsPid)
              end
      end;
  recv_blocks(YawsPid, RPState, Arg, BlockCount, BlockSize, LastBlock) ->
      Sock = Arg#arg.clisock,
      case read(RPState, BlockSize) of
          {ok, Data} ->
              ?Debug("Response content received from the backend server : "
                     "~p bytes~n", [size(Data)]),
              ok = yaws_api:stream_process_deliver(Sock, Data),
              recv_blocks(YawsPid, RPState, Arg, BlockCount-1, BlockSize, LastBlock);
          {error, Reason} ->
              ?Debug("TCP error: ~p~n", [Reason]),
              case Reason of
                  closed ->
                      close(RPState),
                      yaws_api:stream_process_end(closed, YawsPid);
                  _ ->
                      yaws_api:stream_process_end(Sock, YawsPid)
              end
      end.
  
  
negative.code:                     outXXX(500, Arg)
              end;
          true ->
              BlockSize  = SC#sconf.partial_post_size,
              BlockCount = Len div BlockSize,
              LastBlock  = Len rem BlockSize,
              SrvData    = {block, BlockCount, BlockSize, LastBlock},
              RPState1   = RPState#revproxy{state      = terminate,
                                            is_chunked = true,
                                            srvdata    = SrvData},
              out(Arg#arg{state=RPState1})
      end;
  
  %% The response content is chunked. Read the first chunk here and spawn a
  %% process to read others.
  out(#arg{state=RPState}=Arg) when RPState#revproxy.state == recvchunk ->
      case read_chunk(RPState) of
          {ok, Data} ->
  