anchor.diff:  			%% We may need to send an alarm for each of the streams sending data.
   			lists:foldl(
   				fun({StreamID, _, _}, S) -> maybe_send_data_alarm(S, HTTP2Machine0, StreamID) end,
  -				send_data(maybe_ack(State#state{http2_machine=HTTP2Machine}, Frame), SendData),
  +				send_data(maybe_ack(State#state{http2_machine=HTTP2Machine}, Frame), SendData, []),
   				SendData);
   		{error, {stream_error, StreamID, Reason, Human}, HTTP2Machine} ->
   			reset_stream(State#state{http2_machine=HTTP2Machine},
  
positive.code: 	commands(State, StreamID, Tail);
  %% Send a response body chunk.
  commands(State0, StreamID, [{data, IsFin, Data}|Tail]) ->
  	State = maybe_send_data(State0, StreamID, IsFin, Data),
  	commands(State, StreamID, Tail);
  %% Send trailers.
  commands(State0, StreamID, [{trailers, Trailers}|Tail]) ->
  	State = maybe_send_data(State0, StreamID, fin, {trailers, maps:to_list(Trailers)}),
  	commands(State, StreamID, Tail);
  %% Send a push promise.
  %%
  
negative.code: headers_to_list(Headers) ->
  	maps:to_list(Headers).
  
  maybe_send_data(State0=#state{socket=Socket, transport=Transport,
  		http2_machine=HTTP2Machine0}, StreamID, IsFin, Data0, Prefix) ->
  	Data = case is_tuple(Data0) of
  		false -> {data, Data0};
  		true -> Data0
  	end,
  	case cow_http2_machine:send_or_queue_data(StreamID, HTTP2Machine0, IsFin, Data) of
  		{ok, HTTP2Machine} ->
  			%% If we have prefix data (like a HEADERS frame) we need to send it
  			%% even if we do not send any DATA frames.
  			case Prefix of
  				[] -> ok;
  				_ -> Transport:send(Socket, Prefix)
  			end,
  			maybe_send_data_alarm(State0#state{http2_machine=HTTP2Machine}, HTTP2Machine0, StreamID);
  		{send, SendData, HTTP2Machine} ->
  			State = #state{http2_status=Status, streams=Streams}
  				= send_data(State0#state{http2_machine=HTTP2Machine}, SendData, Prefix),
  			%% Terminate the connection if we are closing and all streams have completed.
  			if
  				Status =:= closing, Streams =:= #{} ->
  