diff options
author | Loïc Hoguin <[email protected]> | 2015-04-13 20:41:14 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-04-13 20:41:14 +0300 |
commit | a752035278b6d1b369432dbc3064bf455155059b (patch) | |
tree | dea31b896e256d83340e188190cbee84698c056f | |
parent | 700e2b96d5a37e6db075a74a345823b81fcf1fd1 (diff) | |
download | gun-a752035278b6d1b369432dbc3064bf455155059b.tar.gz gun-a752035278b6d1b369432dbc3064bf455155059b.tar.bz2 gun-a752035278b6d1b369432dbc3064bf455155059b.zip |
One last SPDY test for today
-rw-r--r-- | test/spdy_SUITE.erl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/spdy_SUITE.erl b/test/spdy_SUITE.erl index 401ae87..52068b6 100644 --- a/test/spdy_SUITE.erl +++ b/test/spdy_SUITE.erl @@ -367,3 +367,18 @@ syn_reply_ignore_unknown_flags(_) -> spdy_server:send_raw(ServerPid, Frame), wait(), [_] = spdy_server:stop(ServerPid). + +reject_duplicate_syn_reply(_) -> + doc("Reception of multiple SYN_REPLY for the same Stream-ID must " + "be rejected with a STREAM_IN_USE stream error. (spdy-protocol-draft3-1 2.6.2)"), + {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_reply, 1, false, <<"200">>, <<"HTTP/1.1">>, []}, + {syn_reply, 1, false, <<"200">>, <<"HTTP/1.1">>, []} + ]), + wait(), + [_, {rst_stream, 1, stream_in_use}] = spdy_server:stop(ServerPid). |