mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Fix an intermittent test failure in the rfc7540 suite
This commit is contained in:
parent
1066a8d376
commit
bd6c32d3b7
1 changed files with 8 additions and 1 deletions
|
@ -1243,7 +1243,14 @@ max_frame_size_allow_exactly_default(Config) ->
|
||||||
cow_http2:data(1, fin, << 0:16384/unit:8 >>)
|
cow_http2:data(1, fin, << 0:16384/unit:8 >>)
|
||||||
]),
|
]),
|
||||||
%% Receive a response with the same DATA frame.
|
%% Receive a response with the same DATA frame.
|
||||||
{ok, << SkipLen:24, 1:8, _:8, 1:32 >>} = gen_tcp:recv(Socket, 9, 1000),
|
{ok, << SkipLen:24, 1:8, _:8, 1:32 >>} = case gen_tcp:recv(Socket, 9, 1000) of
|
||||||
|
%% We received a WINDOW_UPDATE first. Skip it and the next.
|
||||||
|
{ok, <<4:24, 8:8, 0:40>>} ->
|
||||||
|
{ok, _} = gen_tcp:recv(Socket, 4 + 13, 1000),
|
||||||
|
gen_tcp:recv(Socket, 9, 1000);
|
||||||
|
Res ->
|
||||||
|
Res
|
||||||
|
end,
|
||||||
{ok, _} = gen_tcp:recv(Socket, SkipLen, 1000),
|
{ok, _} = gen_tcp:recv(Socket, SkipLen, 1000),
|
||||||
{ok, << 16384:24, 0:8, 1:8, 1:32 >>} = gen_tcp:recv(Socket, 9, 1000),
|
{ok, << 16384:24, 0:8, 1:8, 1:32 >>} = gen_tcp:recv(Socket, 9, 1000),
|
||||||
{ok, << 0:16384/unit:8 >>} = gen_tcp:recv(Socket, 16384, 1000),
|
{ok, << 0:16384/unit:8 >>} = gen_tcp:recv(Socket, 16384, 1000),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue