diff options
author | Loïc Hoguin <[email protected]> | 2014-03-25 10:36:15 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-03-25 10:36:15 +0100 |
commit | aa04a9309ccb2022890dbff265046d8f80c4d555 (patch) | |
tree | d910a17682921ac3da4e78dffb6e97d28f324ede | |
parent | bced7b68b7cd0832c809b82549c730cb40fb2da6 (diff) | |
download | gun-aa04a9309ccb2022890dbff265046d8f80c4d555.tar.gz gun-aa04a9309ccb2022890dbff265046d8f80c4d555.tar.bz2 gun-aa04a9309ccb2022890dbff265046d8f80c4d555.zip |
Fix handling of fin in gun_http
Thanks David Cartt for reporting it.
-rw-r--r-- | src/gun_http.erl | 4 |
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 |