aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http2.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-10-02 10:09:30 +0200
committerLoïc Hoguin <[email protected]>2019-10-02 10:09:30 +0200
commit6ddabc2c21498e66ad94a78f1839197c4090e704 (patch)
tree60fa3e14e19320ea92dfae19b7412bfaeccb41c7 /src/cowboy_http2.erl
parentcf84f59d9bdf819d943b3de8e3bc85c561f88efe (diff)
downloadcowboy-6ddabc2c21498e66ad94a78f1839197c4090e704.tar.gz
cowboy-6ddabc2c21498e66ad94a78f1839197c4090e704.tar.bz2
cowboy-6ddabc2c21498e66ad94a78f1839197c4090e704.zip
Remove lingering_data tuple handling
Diffstat (limited to 'src/cowboy_http2.erl')
-rw-r--r--src/cowboy_http2.erl13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl
index c4b9767..f98478a 100644
--- a/src/cowboy_http2.erl
+++ b/src/cowboy_http2.erl
@@ -274,14 +274,16 @@ parse(State=#state{http2_status=Status, http2_machine=HTTP2Machine, streams=Stre
%% Frames received.
+%% We do nothing when receiving a lingering DATA frame.
+%% We already removed the stream flow from the connection
+%% flow and are therefore already accounting for the window
+%% being reduced by these frames.
frame(State=#state{http2_machine=HTTP2Machine0}, Frame) ->
case cow_http2_machine:frame(Frame, HTTP2Machine0) of
{ok, HTTP2Machine} ->
maybe_ack(State#state{http2_machine=HTTP2Machine}, Frame);
{ok, {data, StreamID, IsFin, Data}, HTTP2Machine} ->
data_frame(State#state{http2_machine=HTTP2Machine}, StreamID, IsFin, Data);
- {ok, {lingering_data, StreamID, DataLen}, HTTP2Machine} ->
- lingering_data_frame(State#state{http2_machine=HTTP2Machine}, StreamID, DataLen);
{ok, {headers, StreamID, IsFin, Headers, PseudoHeaders, BodyLen}, HTTP2Machine} ->
headers_frame(State#state{http2_machine=HTTP2Machine},
StreamID, IsFin, Headers, PseudoHeaders, BodyLen);
@@ -343,13 +345,6 @@ data_frame(State0=#state{opts=Opts, flow=Flow, streams=Streams}, StreamID, IsFin
State0
end.
-lingering_data_frame(State, _StreamID, _DataLen) ->
- %% We do nothing when receiving a lingering DATA frame.
- %% We already removed the stream flow from the connection
- %% flow and are therefore already accounting for the window
- %% being reduced by these frames.
- State.
-
headers_frame(State, StreamID, IsFin, Headers,
PseudoHeaders=#{method := <<"CONNECT">>}, _)
when map_size(PseudoHeaders) =:= 2 ->