diff options
author | Loïc Hoguin <[email protected]> | 2019-09-16 11:34:51 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-09-16 11:34:51 +0200 |
commit | d143235a79122f021cb537127dc9dd24073693fe (patch) | |
tree | adbdb20024a2943a2c4948db4d4882f91dcdd931 /src/cowboy_http.erl | |
parent | 8452df061711e42354a2cbb54678da3a5c412793 (diff) | |
download | cowboy-d143235a79122f021cb537127dc9dd24073693fe.tar.gz cowboy-d143235a79122f021cb537127dc9dd24073693fe.tar.bz2 cowboy-d143235a79122f021cb537127dc9dd24073693fe.zip |
Fix closing of connection on response_body_too_small
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r-- | src/cowboy_http.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index 5b07a4c..5136a3b 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -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 |