aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-06-10 09:41:20 +0200
committerLoïc Hoguin <[email protected]>2014-06-10 09:41:20 +0200
commitc957e16a08d1b72bb9ff177206987f18730596be (patch)
tree054e31c91128806d911647be6d65a0f7299400ac /src/gun_http.erl
parent517fec25dcacb0b89148656139f90d91f63de17c (diff)
downloadgun-c957e16a08d1b72bb9ff177206987f18730596be.tar.gz
gun-c957e16a08d1b72bb9ff177206987f18730596be.tar.bz2
gun-c957e16a08d1b72bb9ff177206987f18730596be.zip
Update transfer encoding code to current cowlib interface
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r--src/gun_http.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 5af1b12..be6ba7d 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -70,11 +70,11 @@ handle(Data, State=#http_state{in=body_chunked, in_state=InState,
{more, Data2, InState2} ->
send_data_if_alive(Data2, State, nofin),
State#http_state{buffer= <<>>, in_state=InState2};
- {more, Data2, _Length, InState2} ->
+ {more, Data2, Length, InState2} when is_integer(Length) ->
%% @todo See if we can recv faster than one message at a time.
send_data_if_alive(Data2, State, nofin),
State#http_state{buffer= <<>>, in_state=InState2};
- {more, Data2, _Length, Rest, InState2} ->
+ {more, Data2, Rest, InState2} ->
%% @todo See if we can recv faster than one message at a time.
send_data_if_alive(Data2, State, nofin),
State#http_state{buffer=Rest, in_state=InState2};