aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-12-06 23:40:13 +0100
committerLoïc Hoguin <[email protected]>2017-12-06 23:40:13 +0100
commit33cc99ca4947f49c40ec061837cc58c7d7fc1ace (patch)
tree9e84fbca560d190b894316f17d5085ef38550fef
parente58460252ef758042b69f87f36e1ce4033463659 (diff)
downloadgun-33cc99ca4947f49c40ec061837cc58c7d7fc1ace.tar.gz
gun-33cc99ca4947f49c40ec061837cc58c7d7fc1ace.tar.bz2
gun-33cc99ca4947f49c40ec061837cc58c7d7fc1ace.zip
Don't send transfer-encoding for HTTP/1.0
-rw-r--r--src/gun_http.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index ef8d720..fa74d11 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -289,6 +289,7 @@ request(State=#http_state{socket=Socket, transport=Transport, version=Version,
Conn = conn_from_headers(Version, Headers2),
Out = request_io_from_headers(Headers2),
Headers4 = case Out of
+ body_chunked when Version =:= 'HTTP/1.0' -> Headers3;
body_chunked -> [{<<"transfer-encoding">>, <<"chunked">>}|Headers3];
_ -> Headers3
end,