mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix closing of connection on response_body_too_small
This commit is contained in:
parent
8452df0617
commit
d143235a79
2 changed files with 10 additions and 6 deletions
|
@ -1215,7 +1215,7 @@ stream_terminate(State0=#state{opts=Opts, in_streamid=InStreamID, in_state=InSta
|
|||
info(State0, StreamID, {response, 204, #{}, <<>>});
|
||||
chunked when Version =:= 'HTTP/1.1' ->
|
||||
info(State0, StreamID, {data, fin, <<>>});
|
||||
streaming when ExpectedSize < SentSize ->
|
||||
streaming when SentSize < ExpectedSize ->
|
||||
terminate(State0, response_body_too_small);
|
||||
_ -> %% done or Version =:= 'HTTP/1.0'
|
||||
State0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue