0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Fix the flushing of messages when switching to Websocket

We now flush messages that are specific to cowboy_http only.

Stream handlers should also flush their own specific messages
if necessary, although timeouts will be flushed regardless
of where they originate from.

Also renames the http_SUITE to old_http_SUITE to distinguish
new tests from old tests. Most old tests need to be removed
or converted eventually as they're legacy tests from Cowboy 1.0.
This commit is contained in:
Loïc Hoguin 2018-03-26 18:49:09 +02:00
parent 4d5174632c
commit 5964273cc4
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
24 changed files with 883 additions and 777 deletions

View file

@ -108,10 +108,6 @@ proc_lib_initial_call_tls(Config) ->
%% the receiving process module. When a system message is received,
%% function handle_system_msg/6 is called to handle the request.
%% @todo The flush/0 function in cowboy_http needs to be fixed
%% so that it doesn't eat up system messages. It should only
%% flush messages that are specific to cowboy_http.
bad_system_from_h1(Config) ->
doc("h1: Sending a system message with a bad From value results in a process crash."),
{ok, Socket} = gen_tcp:connect("localhost", config(clear_port, Config), [{active, false}]),