Skip to content

Commit

Permalink
websocket: add data frame
Browse files Browse the repository at this point in the history
Ticket: 7051
  • Loading branch information
catenacyber authored and victorjulien committed Jun 7, 2024
1 parent 43b998a commit d9d5170
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rust/src/websocket/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static mut WEBSOCKET_MAX_PAYLOAD_SIZE: u32 = 0xFFFF;
pub enum WebSocketFrameType {
Header,
Pdu,
Data,
}

#[derive(AppLayerEvent)]
Expand Down Expand Up @@ -175,6 +176,14 @@ impl WebSocketState {
WebSocketFrameType::Pdu as u8,
Some(tx.tx_id),
);
let _pdu = Frame::new(
flow,
&stream_slice,
&start[(start.len() - rem.len() - pdu.payload.len())..],
pdu.payload.len() as i64,
WebSocketFrameType::Data as u8,
Some(tx.tx_id),
);
start = rem;
if pdu.to_skip > 0 {
if direction == Direction::ToClient {
Expand Down

0 comments on commit d9d5170

Please sign in to comment.