aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE_data/http_set_resp.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/http_SUITE_data/http_set_resp.erl')
-rw-r--r--test/http_SUITE_data/http_set_resp.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/http_SUITE_data/http_set_resp.erl b/test/http_SUITE_data/http_set_resp.erl
index 2e7f835..6ac4c8e 100644
--- a/test/http_SUITE_data/http_set_resp.erl
+++ b/test/http_SUITE_data/http_set_resp.erl
@@ -5,11 +5,11 @@
-export([init/2]).
init(Req, Opts) ->
- Headers = proplists:get_value(headers, Opts, []),
+ Headers = proplists:get_value(headers, Opts, #{}),
Body = proplists:get_value(body, Opts, <<"http_handler_set_resp">>),
Req2 = lists:foldl(fun({Name, Value}, R) ->
cowboy_req:set_resp_header(Name, Value, R)
- end, Req, Headers),
+ end, Req, maps:to_list(Headers)),
Req3 = cowboy_req:set_resp_body(Body, Req2),
Req4 = cowboy_req:set_resp_header(<<"x-cowboy-test">>, <<"ok">>, Req3),
Req5 = cowboy_req:set_resp_cookie(<<"cake">>, <<"lie">>, [], Req4),