mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Do not send a 101 after a final response in switch_protocol
This commit is contained in:
parent
26bc4afad4
commit
b56a5a1d60
5 changed files with 68 additions and 3 deletions
|
@ -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}) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue