Commit 8ca1a8b9 authored by Samir Halilcevic's avatar Samir Halilcevic

Add test for RSV bit failure

parent 83d44fb3
...@@ -60,6 +60,16 @@ TEST_CASE("masking") { ...@@ -60,6 +60,16 @@ TEST_CASE("masking") {
CHECK_EQ(masked_data, data); CHECK_EQ(masked_data, data);
} }
TEST_CASE("decoding a frame with RSV bits fails") {
std::vector<uint8_t> data;
byte_buffer out = bytes({
0xF2, // FIN + RSV + binary frame opcode
0x00, // data size = 0
});
impl::header hdr;
CHECK_EQ(impl::decode_header(out, hdr), -1);
}
TEST_CASE("no mask key and no data") { TEST_CASE("no mask key and no data") {
std::vector<uint8_t> data; std::vector<uint8_t> data;
byte_buffer out; byte_buffer out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment