aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-16 13:09:01 +0100
committerLoïc Hoguin <[email protected]>2018-11-16 13:09:01 +0100
commit75045637fc6026054900f2dbea75805ad7c8e682 (patch)
treea7d426e8a463de52127981758e6e6624c30b609c /test/handlers
parent1949357f0cbcc1e6c94add457c7cad90d35340c1 (diff)
downloadcowboy-75045637fc6026054900f2dbea75805ad7c8e682.tar.gz
cowboy-75045637fc6026054900f2dbea75805ad7c8e682.tar.bz2
cowboy-75045637fc6026054900f2dbea75805ad7c8e682.zip
Ensure unknown options are ignored in set_options command
Diffstat (limited to 'test/handlers')
-rw-r--r--test/handlers/stream_handler_h.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/handlers/stream_handler_h.erl b/test/handlers/stream_handler_h.erl
index 2196be3..3761e11 100644
--- a/test/handlers/stream_handler_h.erl
+++ b/test/handlers/stream_handler_h.erl
@@ -34,6 +34,12 @@ init_commands(_, _, #state{test=crash_in_terminate}) ->
[{response, 200, #{<<"content-length">> => <<"12">>}, <<"Hello world!">>}, stop];
init_commands(_, _, #state{test=crash_in_early_error}) ->
error(crash);
+init_commands(_, _, #state{test=set_options_ignore_unknown}) ->
+ [
+ {set_options, #{unknown_options => true}},
+ {response, 200, #{<<"content-length">> => <<"12">>}, <<"Hello world!">>},
+ stop
+ ];
init_commands(_, _, State=#state{test=shutdown_on_stream_stop}) ->
Spawn = init_process(false, State),
[{headers, 200, #{}}, {spawn, Spawn, 5000}, stop];