diff options
author | Loïc Hoguin <[email protected]> | 2019-07-26 10:02:30 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-07-26 10:02:30 +0200 |
commit | 8b6b528b246ff6009430cdd592886a6299968d68 (patch) | |
tree | eda27142677b2f79c881f5c888d47e6313a48a1c /src | |
parent | 0937c516a85b64a42660f973035bcc5799d545ac (diff) | |
download | cowlib-8b6b528b246ff6009430cdd592886a6299968d68.tar.gz cowlib-8b6b528b246ff6009430cdd592886a6299968d68.tar.bz2 cowlib-8b6b528b246ff6009430cdd592886a6299968d68.zip |
Don't return lingering_data when the length is 0
Diffstat (limited to 'src')
-rw-r--r-- | src/cow_http2_machine.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cow_http2_machine.erl b/src/cow_http2_machine.erl index 76fe957..10c79e3 100644 --- a/src/cow_http2_machine.erl +++ b/src/cow_http2_machine.erl @@ -349,9 +349,11 @@ data_frame(Frame={data, StreamID, _, Data}, State0=#http2_machine{ undefined -> %% After we send an RST_STREAM frame and terminate a stream, %% the remote endpoint still might be sending us some more frames - %% until it can process this RST_STREAM. We therefore ignore - %% DATA frames received for such lingering streams. + %% until it can process this RST_STREAM. We cannot use those + %% DATA frames, however we still might want to update the window. case lists:member(StreamID, Lingering) of + true when DataLen =:= 0 -> + {ok, State}; true -> {ok, {lingering_data, StreamID, DataLen}, State}; false -> |