aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-04-16 14:44:23 +0200
committerLoïc Hoguin <[email protected]>2020-04-16 14:44:23 +0200
commit6599fc9a0ce1721271cc070f6d54a677d466c583 (patch)
treeb91135d92fd7b849aa88f06157b6f48d1c310417 /test/handlers
parente1a69b36b180a574c0ac314ced9613fdd52312cc (diff)
downloadgun-6599fc9a0ce1721271cc070f6d54a677d466c583.tar.gz
gun-6599fc9a0ce1721271cc070f6d54a677d466c583.tar.bz2
gun-6599fc9a0ce1721271cc070f6d54a677d466c583.zip
Add tests for cookie_ignore_informational option
Diffstat (limited to 'test/handlers')
-rw-r--r--test/handlers/cookie_informational_h.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/handlers/cookie_informational_h.erl b/test/handlers/cookie_informational_h.erl
new file mode 100644
index 0000000..71e1b4a
--- /dev/null
+++ b/test/handlers/cookie_informational_h.erl
@@ -0,0 +1,10 @@
+%% Feel free to use, reuse and abuse the code in this file.
+
+-module(cookie_informational_h).
+
+-export([init/2]).
+
+init(Req0, State) ->
+ cowboy_req:inform(103, #{<<"set-cookie">> => [<<"informational=1">>]}, Req0),
+ Req = cowboy_req:reply(204, #{<<"set-cookie">> => [<<"final=1">>]}, Req0),
+ {ok, Req, State}.