anchor.diff:  		{recv, FromSocket = {Pid, StreamID}, FromPid, Length, _Timeout}
   				when Pid =:= self() ->
   			Child = #child{in_buffer=InBuffer, is_recv=false}
  -				= lists:keyfind(StreamID, #child.streamid, Children),
  +				= get_child(StreamID, State),
   			if
   				Length =:= 0, InBuffer =/= <<>> ->
   					FromPid ! {recv, FromSocket, {ok, InBuffer}},
  
positive.code: 			end;
  		{reply, {Pid, StreamID}, Status, Headers}
  				when Pid =:= self() ->
  			Child = #child{output=nofin} = lists:keyfind(StreamID,
  				#child.streamid, Children),
  			syn_reply(State, StreamID, true, Status, Headers),
  			Children2 = lists:keyreplace(StreamID,
  				#child.streamid, Children, Child#child{output=fin}),
  			loop(State#state{children=Children2});
  		{reply, {Pid, StreamID}, Status, Headers, Body}
  				when Pid =:= self() ->
  			Child = #child{output=nofin} = lists:keyfind(StreamID,
  				#child.streamid, Children),
  			syn_reply(State, StreamID, false, Status, Headers),
  			data(State, StreamID, true, Body),
  			Children2 = lists:keyreplace(StreamID,
  				#child.streamid, Children, Child#child{output=fin}),
  			loop(State#state{children=Children2});
  		{stream_reply, {Pid, StreamID}, Status, Headers}
  				when Pid =:= self() ->
  			#child{output=nofin} = lists:keyfind(StreamID,
  				#child.streamid, Children),
  			syn_reply(State, StreamID, false, Status, Headers),
  			loop(State);
  		{stream_data, {Pid, StreamID}, Data}
  				when Pid =:= self() ->
  			#child{output=nofin} = lists:keyfind(StreamID,
  				#child.streamid, Children),
  			data(State, StreamID, false, Data),
  			loop(State);
  		{stream_close, {Pid, StreamID}}
  				when Pid =:= self() ->
  			Child = #child{output=nofin} = lists:keyfind(StreamID,
  				#child.streamid, Children),
  			data(State, StreamID, true, <<>>),
  			Children2 = lists:keyreplace(StreamID,
  				#child.streamid, Children, Child#child{output=fin}),
  			loop(State#state{children=Children2});
  		{sendfile, {Pid, StreamID}, Filepath}
  				when Pid =:= self() ->
  			Child = #child{output=nofin} = lists:keyfind(StreamID,
  				#child.streamid, Children),
  			data_from_file(State, StreamID, Filepath),
  			Children2 = lists:keyreplace(StreamID,
  				#child.streamid, Children, Child#child{output=fin}),
  			loop(State#state{children=Children2});
  		{'EXIT', Parent, Reason} ->
  			exit(Reason);
  		{'EXIT', Pid, _} ->
  			%% @todo Report the error if any.
  			Children2 = lists:keydelete(Pid, #child.pid, Children),
  			loop(State#state{children=Children2});
  		{system, From, Request} ->
  			sys:handle_system_msg(Request, From, Parent, ?MODULE, [], State);
  		%% Calls from the supervisor module.
  
negative.code: handle_frame(State=#state{children=Children},
  		{data, StreamID, IsFin, Data}) ->
  	Child = #child{input=nofin, in_buffer=Buffer, is_recv=IsRecv}
  		= get_child(StreamID, State),
  	Data2 = << Buffer/binary, Data/binary >>,
  	IsFin2 = if IsFin -> fin; true -> nofin end,
  	Child2 = case IsRecv of
  