mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50: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:
parent
e87438ffb1
commit
92edad53d2
5 changed files with 740 additions and 25 deletions
|
@ -1187,20 +1187,4 @@ connection_to_atom_test_() ->
|
|||
],
|
||||
[{lists:flatten(io_lib:format("~p", [T])),
|
||||
fun() -> R = connection_to_atom(T) end} || {T, R} <- Tests].
|
||||
|
||||
merge_headers_test_() ->
|
||||
Tests = [
|
||||
{[{<<"content-length">>,<<"13">>},{<<"server">>,<<"Cowboy">>}],
|
||||
[{<<"set-cookie">>,<<"foo=bar">>},{<<"content-length">>,<<"11">>}],
|
||||
[{<<"set-cookie">>,<<"foo=bar">>},
|
||||
{<<"content-length">>,<<"13">>},
|
||||
{<<"server">>,<<"Cowboy">>}]},
|
||||
{[{<<"content-length">>,<<"13">>},{<<"server">>,<<"Cowboy">>}],
|
||||
[{<<"set-cookie">>,<<"foo=bar">>},{<<"set-cookie">>,<<"bar=baz">>}],
|
||||
[{<<"set-cookie">>,<<"bar=baz">>},
|
||||
{<<"set-cookie">>,<<"foo=bar">>},
|
||||
{<<"content-length">>,<<"13">>},
|
||||
{<<"server">>,<<"Cowboy">>}]}
|
||||
],
|
||||
[fun() -> Res = merge_headers(L,R) end || {L, R, Res} <- Tests].
|
||||
-endif.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue