diff options
author | Andrei Nesterov <[email protected]> | 2017-05-07 00:01:16 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-01-21 20:06:50 +0100 |
commit | bc6d32f4f1f2e1c2d234aec66ec43996e627b8f9 (patch) | |
tree | 4efe043e00778edc35aba299331586db7139a57b /src/gun_http.erl | |
parent | ac66d46116b5519aefad8d216b97a6be35d758eb (diff) | |
download | gun-bc6d32f4f1f2e1c2d234aec66ec43996e627b8f9.tar.gz gun-bc6d32f4f1f2e1c2d234aec66ec43996e627b8f9.tar.bz2 gun-bc6d32f4f1f2e1c2d234aec66ec43996e627b8f9.zip |
Do not expect a message body for 204, 304 status codes of HTTP/1.1
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r-- | src/gun_http.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl index eac9ede..6546df9 100644 --- a/src/gun_http.erl +++ b/src/gun_http.erl @@ -420,7 +420,7 @@ request_io_from_headers(Headers) -> response_io_from_headers(<<"HEAD">>, _, _, _) -> head; -response_io_from_headers(_, _, 204, _) -> +response_io_from_headers(_, _, Status, _) when (Status =:= 204) or (Status =:= 304) -> head; response_io_from_headers(_, Version, _Status, Headers) -> case lists:keyfind(<<"content-length">>, 1, Headers) of |