aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-04-27 20:19:02 +0200
committerLoïc Hoguin <[email protected]>2018-04-27 20:19:02 +0200
commit5d5a00c8636fc6d22491765738d02da54356e4c0 (patch)
tree65a485e4f5b7a51102cef3c73a9b918e414b0c73
parent9a29aea148c55d12ac9141bc8c60b2456b4ef42b (diff)
downloadcowboy-5d5a00c8636fc6d22491765738d02da54356e4c0.tar.gz
cowboy-5d5a00c8636fc6d22491765738d02da54356e4c0.tar.bz2
cowboy-5d5a00c8636fc6d22491765738d02da54356e4c0.zip
Fix an rfc7540 test to have a different error reason
-rw-r--r--test/rfc7540_SUITE.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl
index ca483c2..9200270 100644
--- a/test/rfc7540_SUITE.erl
+++ b/test/rfc7540_SUITE.erl
@@ -2173,9 +2173,11 @@ reject_streamid_0(Config) ->
{ok, << _:24, 7:8, _:72, 1:32 >>} = gen_tcp:recv(Socket, 17, 6000),
ok.
+%% See the comment for reject_streamid_lower for the rationale behind
+%% having a STREAM_CLOSED connection error.
http_upgrade_reject_reuse_streamid_1(Config) ->
doc("Attempts to reuse streamid 1 after upgrading to HTTP/2 "
- "must be rejected with a PROTOCOL_ERROR connection error. (RFC7540 5.1.1)"),
+ "must be rejected with a STREAM_CLOSED connection error. (RFC7540 5.1.1)"),
{ok, Socket} = gen_tcp:connect("localhost", config(port, Config), [binary, {active, false}]),
ok = gen_tcp:send(Socket, [
"GET / HTTP/1.1\r\n"
@@ -2218,8 +2220,8 @@ http_upgrade_reject_reuse_streamid_1(Config) ->
{<<":path">>, <<"/">>}
]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)),
- %% Receive a PROTOCOL_ERROR connection error.
- {ok, << _:24, 7:8, _:72, 1:32 >>} = gen_tcp:recv(Socket, 17, 6000),
+ %% Receive a STREAM_CLOSED connection error.
+ {ok, << _:24, 7:8, _:72, 5:32 >>} = gen_tcp:recv(Socket, 17, 6000),
ok.
%% The RFC gives us various error codes to return for this case,