diff options
author | Loïc Hoguin <[email protected]> | 2018-11-14 19:24:39 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-11-14 19:24:39 +0100 |
commit | 292039362a6125dfd0a163d5b0a49b800bf80b11 (patch) | |
tree | 31a38f67960503ece6abfa82a0d285152d8dc4ff /test/handlers/resp_h.erl | |
parent | 4fedb336311604253153eafe81f33a77b44a0b2f (diff) | |
download | cowboy-292039362a6125dfd0a163d5b0a49b800bf80b11.tar.gz cowboy-292039362a6125dfd0a163d5b0a49b800bf80b11.tar.bz2 cowboy-292039362a6125dfd0a163d5b0a49b800bf80b11.zip |
Don't send the content-length header in empty 304 responses
It's OK to send it when set explicitly, as it can be set
to what the representation's size would have been.
Diffstat (limited to 'test/handlers/resp_h.erl')
-rw-r--r-- | test/handlers/resp_h.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/handlers/resp_h.erl b/test/handlers/resp_h.erl index 7a80e75..1c587ce 100644 --- a/test/handlers/resp_h.erl +++ b/test/handlers/resp_h.erl @@ -186,6 +186,9 @@ do(<<"stream_reply2">>, Req0, Opts) -> <<"204">> -> Req = cowboy_req:stream_reply(204, Req0), {ok, Req, Opts}; + <<"304">> -> + Req = cowboy_req:stream_reply(304, Req0), + {ok, Req, Opts}; Status -> Req = cowboy_req:stream_reply(binary_to_integer(Status), Req0), stream_body(Req), |