mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Add test for issue 802
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
Version 121:
|
||||
|
||||
* Add test for issue 802
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Version 120:
|
||||
|
||||
* Fix spurious strand_ in advanced_server_flex
|
||||
|
@ -1008,6 +1008,27 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
testIssue802()
|
||||
{
|
||||
for(std::size_t i = 0; i < 100; ++i)
|
||||
{
|
||||
echo_server es{log, kind::async};
|
||||
boost::asio::io_service ios;
|
||||
stream<test::stream> ws{ios};
|
||||
ws.next_layer().connect(es.stream());
|
||||
ws.handshake("localhost", "/");
|
||||
// too-big message frame indicates payload of 2^64-1
|
||||
boost::asio::write(ws.next_layer(), sbuf(
|
||||
"\x81\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"));
|
||||
multi_buffer b;
|
||||
error_code ec;
|
||||
ws.read(b, ec);
|
||||
BEAST_EXPECT(ec == error::closed);
|
||||
BEAST_EXPECT(ws.reason().code == 1009);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
@ -1015,6 +1036,7 @@ public:
|
||||
testSuspend();
|
||||
testParseFrame();
|
||||
testContHook();
|
||||
testIssue802();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user