aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnix1 <[email protected]>2014-06-11 07:47:15 -0700
committerUnix1 <[email protected]>2014-10-26 23:15:55 -0700
commit54123924e717546920f10bad3f0bcda1d8af94c2 (patch)
tree79d21d5204901dccd0488823bec7634d38358aab
parent517fec25dcacb0b89148656139f90d91f63de17c (diff)
downloadgun-54123924e717546920f10bad3f0bcda1d8af94c2.tar.gz
gun-54123924e717546920f10bad3f0bcda1d8af94c2.tar.bz2
gun-54123924e717546920f10bad3f0bcda1d8af94c2.zip
Return body when content-length not specified
Per extend/gun#22 we need to return body until server closes connection when server doesn't specify content-length and transfer-encoding
-rw-r--r--src/gun_http.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 5af1b12..86fc436 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -301,7 +301,7 @@ io_from_headers(Version, Headers) ->
_ ->
case lists:keyfind(<<"transfer-encoding">>, 1, Headers) of
false ->
- head;
+ body_close;
{_, TE} ->
case cow_http_hd:parse_transfer_encoding(TE) of
[<<"chunked">>] -> body_chunked;