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

Add the beginning of the rfc7540 test suite

Currently only testing handshake.

Tests that pass currently involve no request/response.
ALPN and prior knowledge support have some edge cases left to fix.
HTTP/1.1 Upgrade has not been implemented yet.
This commit is contained in:
Loïc Hoguin 2016-03-10 23:30:49 +01:00
parent e87438ffb1
commit 92edad53d2
5 changed files with 740 additions and 25 deletions

View file

@ -30,6 +30,12 @@ init_https(Ref, ProtoOpts, Config) ->
Port = ranch:get_port(Ref),
[{type, ssl}, {protocol, http}, {port, Port}, {opts, Opts}|Config].
init_http2(Ref, ProtoOpts, Config) ->
Opts = ct_helper:get_certs_from_ets(),
{ok, _} = cowboy:start_tls(Ref, 100, Opts ++ [{port, 0}], ProtoOpts),
Port = ranch:get_port(Ref),
[{type, ssl}, {protocol, http2}, {port, Port}, {opts, Opts}|Config].
%% Common group of listeners used by most suites.
common_all() ->