aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-04-13 11:55:24 +0300
committerLoïc Hoguin <[email protected]>2015-04-13 11:55:24 +0300
commit476147d068a281d456b2748cae7cd7537ec4b37a (patch)
tree550b608e18f6a53d9d288ba0c8a928bc708b5da7 /test
parentae51c45bf09a1d7f5938c240ac3920b64dbf0718 (diff)
downloadgun-476147d068a281d456b2748cae7cd7537ec4b37a.tar.gz
gun-476147d068a281d456b2748cae7cd7537ec4b37a.tar.bz2
gun-476147d068a281d456b2748cae7cd7537ec4b37a.zip
One more SPDY test
Diffstat (limited to 'test')
-rw-r--r--test/spdy_SUITE.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/spdy_SUITE.erl b/test/spdy_SUITE.erl
index 649fae1..44fbbbe 100644
--- a/test/spdy_SUITE.erl
+++ b/test/spdy_SUITE.erl
@@ -261,3 +261,22 @@ reject_data_on_closed_stream(_) ->
]),
wait(),
[_, {rst_stream, 1, protocol_error}] = spdy_server:stop(ServerPid).
+
+%% @todo We need to test that we do the right thing when the server sends a GOAWAY.
+goaway_last_good_streamid(_) ->
+ doc("The GOAWAY frame must contain the Stream-ID of the last recently "
+ "received stream from the remote endpoint. (spdy-protocol-draft3-1 2.4.1)"),
+ {ok, ServerPid, Port} = spdy_server:start_link(),
+ {ok, ConnPid} = gun:open("localhost", Port, #{transport=>ssl}),
+ {ok, spdy} = gun:await_up(ConnPid),
+ _ = gun:get(ConnPid, "/"),
+ Host = ["localhost:", integer_to_binary(Port)],
+ spdy_server:send(ServerPid, [
+ {syn_stream, 2, 1, true, true, 0, <<"GET">>, <<"https">>, Host, "/a", <<"HTTP/1.1">>, []},
+ {syn_stream, 4, 1, true, true, 0, <<"GET">>, <<"https">>, Host, "/c", <<"HTTP/1.1">>, []},
+ {syn_stream, 6, 1, true, true, 0, <<"GET">>, <<"https">>, Host, "/b", <<"HTTP/1.1">>, []},
+ {syn_reply, 0, true, <<"200">>, <<"HTTP/1.1">>, []}
+ ]),
+ wait(),
+ [{goaway, 6, protocol_error}] = spdy_server:stop(ServerPid),
+ down().