Commit 2239e1ec authored by Samir Halilcevic's avatar Samir Halilcevic

Stop handling continuation frames as control frames

parent 59a85143
......@@ -59,7 +59,8 @@ struct CAF_NET_EXPORT rfc6455 {
static ptrdiff_t decode_header(const_byte_span data, header& hdr);
static constexpr bool is_control_frame(uint8_t opcode) noexcept {
return opcode != text_frame && opcode != binary_frame;
return opcode != text_frame && opcode != binary_frame
&& opcode != continuation_frame;
}
};
......
......@@ -77,8 +77,7 @@ ptrdiff_t framing::consume(byte_span buffer, byte_span) {
}
// Handle control frames first, since these may not me fragmented,
// and can arrive between regular message fragments.
if (detail::rfc6455::is_control_frame(hdr.opcode)
&& hdr.opcode != detail::rfc6455::continuation_frame) {
if (detail::rfc6455::is_control_frame(hdr.opcode)) {
if (!hdr.fin) {
abort_and_shutdown(sec::protocol_error,
"received a fragmented WebSocket control message");
......
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