Skip to content

Commit 71b4147

Browse files
committed
Improve the set_resp_headers_list test
1 parent e8a1868 commit 71b4147

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

test/handlers/resp_h.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ do(<<"set_resp_headers">>, Req0, Opts) ->
4646
do(<<"set_resp_headers_list">>, Req0, Opts) ->
4747
Req = cowboy_req:set_resp_headers([
4848
{<<"content-type">>, <<"text/plain">>},
49-
{<<"content-encoding">>, <<"compress">>}
49+
{<<"test-header">>, <<"one">>},
50+
{<<"content-encoding">>, <<"compress">>},
51+
{<<"test-header">>, <<"two">>}
5052
], Req0),
5153
{ok, cowboy_req:reply(200, #{}, "OK", Req), Opts};
5254
do(<<"set_resp_headers_cookie">>, Req0, Opts) ->

test/req_SUITE.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@ set_resp_headers(Config) ->
864864
{200, Headers2, <<"OK">>} = do_get("/resp/set_resp_headers_list", Config),
865865
true = lists:keymember(<<"content-type">>, 1, Headers2),
866866
true = lists:keymember(<<"content-encoding">>, 1, Headers2),
867+
{_, <<"one, two">>} = lists:keyfind(<<"test-header">>, 1, Headers2),
867868
%% The set-cookie header is special. set_resp_cookie must be used.
868869
{500, _, _} = do_maybe_h3_error3(do_get("/resp/set_resp_headers_cookie", Config)),
869870
{500, _, _} = do_maybe_h3_error3(do_get("/resp/set_resp_headers_list_cookie", Config)),

0 commit comments

Comments
 (0)