Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
d121310b
Unverified
Commit
d121310b
authored
Jul 18, 2023
by
Dominik Charousset
Committed by
GitHub
Jul 18, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1497
Stop handling continuation frames as control frames
parents
c0618601
4f24f8bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
libcaf_net/caf/detail/rfc6455.hpp
libcaf_net/caf/detail/rfc6455.hpp
+1
-1
libcaf_net/caf/net/web_socket/framing.cpp
libcaf_net/caf/net/web_socket/framing.cpp
+1
-2
No files found.
libcaf_net/caf/detail/rfc6455.hpp
View file @
d121310b
...
@@ -59,7 +59,7 @@ struct CAF_NET_EXPORT rfc6455 {
...
@@ -59,7 +59,7 @@ struct CAF_NET_EXPORT rfc6455 {
static
ptrdiff_t
decode_header
(
const_byte_span
data
,
header
&
hdr
);
static
ptrdiff_t
decode_header
(
const_byte_span
data
,
header
&
hdr
);
static
constexpr
bool
is_control_frame
(
uint8_t
opcode
)
noexcept
{
static
constexpr
bool
is_control_frame
(
uint8_t
opcode
)
noexcept
{
return
opcode
!=
text_frame
&&
opcode
!=
binary_frame
;
return
opcode
>
binary_frame
;
}
}
};
};
...
...
libcaf_net/caf/net/web_socket/framing.cpp
View file @
d121310b
...
@@ -77,8 +77,7 @@ ptrdiff_t framing::consume(byte_span buffer, byte_span) {
...
@@ -77,8 +77,7 @@ ptrdiff_t framing::consume(byte_span buffer, byte_span) {
}
}
// Handle control frames first, since these may not me fragmented,
// Handle control frames first, since these may not me fragmented,
// and can arrive between regular message fragments.
// and can arrive between regular message fragments.
if
(
detail
::
rfc6455
::
is_control_frame
(
hdr
.
opcode
)
if
(
detail
::
rfc6455
::
is_control_frame
(
hdr
.
opcode
))
{
&&
hdr
.
opcode
!=
detail
::
rfc6455
::
continuation_frame
)
{
if
(
!
hdr
.
fin
)
{
if
(
!
hdr
.
fin
)
{
abort_and_shutdown
(
sec
::
protocol_error
,
abort_and_shutdown
(
sec
::
protocol_error
,
"received a fragmented WebSocket control message"
);
"received a fragmented WebSocket control message"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment