aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_stream_h.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-05-18 18:03:56 +0200
committerLoïc Hoguin <[email protected]>2018-05-18 18:38:26 +0200
commit5229d790fb720ea340171e4b290cffdce9c68197 (patch)
tree4a9991defeddbd272bed5d8e6f90c3f71b45cd3f /src/cowboy_stream_h.erl
parent763eef4e46dd8ffb5bb10ddccb1eb761971d8382 (diff)
downloadcowboy-5229d790fb720ea340171e4b290cffdce9c68197.tar.gz
cowboy-5229d790fb720ea340171e4b290cffdce9c68197.tar.bz2
cowboy-5229d790fb720ea340171e4b290cffdce9c68197.zip
Don't send transfer-encoding when streaming 204 responses
Diffstat (limited to 'src/cowboy_stream_h.erl')
-rw-r--r--src/cowboy_stream_h.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cowboy_stream_h.erl b/src/cowboy_stream_h.erl
index 620975c..7f72080 100644
--- a/src/cowboy_stream_h.erl
+++ b/src/cowboy_stream_h.erl
@@ -178,10 +178,8 @@ info(_StreamID, {read_body_timeout, _}, State) ->
%% We reset the expect field when a 100 continue response
%% is sent or when any final response is sent.
info(_StreamID, Inform = {inform, Status, _}, State0) ->
- State = case Status of
+ State = case cow_http:status_to_integer(Status) of
100 -> State0#state{expect=undefined};
- <<"100">> -> State0#state{expect=undefined};
- <<"100 ", _/bits>> -> State0#state{expect=undefined};
_ -> State0
end,
{[Inform], State};