diff options
Diffstat (limited to 'test/handlers/echo_h.erl')
-rw-r--r-- | test/handlers/echo_h.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/handlers/echo_h.erl b/test/handlers/echo_h.erl index 7d0e75b..1b672d1 100644 --- a/test/handlers/echo_h.erl +++ b/test/handlers/echo_h.erl @@ -92,6 +92,10 @@ echo(<<"match">>, Req, Opts) -> Match end, {ok, cowboy_req:reply(200, #{}, value_to_iodata(Value), Req), Opts}; +echo(<<"filter_then_parse_cookies">>, Req0, Opts) -> + Req = cowboy_req:filter_cookies([cake, color], Req0), + Value = cowboy_req:parse_cookies(Req), + {ok, cowboy_req:reply(200, #{}, value_to_iodata(Value), Req), Opts}; echo(What, Req, Opts) -> Key = binary_to_atom(What, latin1), Value = case cowboy_req:path(Req) of |