From 292039362a6125dfd0a163d5b0a49b800bf80b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 14 Nov 2018 19:24:39 +0100 Subject: 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. --- test/handlers/resp_h.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/handlers') 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), -- cgit v1.2.3