aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-03-25 10:36:15 +0100
committerLoïc Hoguin <[email protected]>2014-03-25 10:36:15 +0100
commitaa04a9309ccb2022890dbff265046d8f80c4d555 (patch)
treed910a17682921ac3da4e78dffb6e97d28f324ede /src/gun_http.erl
parentbced7b68b7cd0832c809b82549c730cb40fb2da6 (diff)
downloadgun-aa04a9309ccb2022890dbff265046d8f80c4d555.tar.gz
gun-aa04a9309ccb2022890dbff265046d8f80c4d555.tar.bz2
gun-aa04a9309ccb2022890dbff265046d8f80c4d555.zip
Fix handling of fin in gun_http
Thanks David Cartt for reporting it.
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 846ca4c..76475d2 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -245,9 +245,9 @@ data(State=#http_state{socket=Socket, transport=Transport, version=Version,
Transport:send(Socket, Data),
Length2 = Length - DataSize,
if
- Length2 =:= 0, IsFin ->
+ Length2 =:= 0, IsFin =:= fin ->
State#http_state{out=head};
- Length2 > 0, not IsFin ->
+ Length2 > 0, IsFin =:= nofin ->
State#http_state{out={body, Length2}}
end;
body_chunked -> %% HTTP/1.0