From b56a5a1d60715ae115723c11c27ff7e032a3c4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 12 Sep 2018 16:16:29 +0200 Subject: Do not send a 101 after a final response in switch_protocol --- test/handlers/stream_handler_h.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/handlers') diff --git a/test/handlers/stream_handler_h.erl b/test/handlers/stream_handler_h.erl index 7aa3195..0f245c6 100644 --- a/test/handlers/stream_handler_h.erl +++ b/test/handlers/stream_handler_h.erl @@ -46,6 +46,12 @@ init_commands(_, _, State=#state{test=shutdown_timeout_on_stream_stop}) -> init_commands(_, _, State=#state{test=shutdown_timeout_on_socket_close}) -> Spawn = init_process(true, State), [{headers, 200, #{}}, {spawn, Spawn, 2000}]; +init_commands(_, _, State=#state{test=switch_protocol_after_headers}) -> + [{headers, 200, #{}}, {switch_protocol, #{}, ?MODULE, State}]; +init_commands(_, _, State=#state{test=switch_protocol_after_headers_data}) -> + [{headers, 200, #{}}, {data, fin, <<"{}">>}, {switch_protocol, #{}, ?MODULE, State}]; +init_commands(_, _, State=#state{test=switch_protocol_after_response}) -> + [{response, 200, #{}, <<"{}">>}, {switch_protocol, #{}, ?MODULE, State}]; init_commands(_, _, State=#state{test=terminate_on_switch_protocol}) -> [{switch_protocol, #{}, ?MODULE, State}]; init_commands(_, _, #state{test=terminate_on_stop}) -> -- cgit v1.2.3