Skip to content

Commit

Permalink
fix: check rsv1 even if deflate enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
PrivateRookie committed Nov 23, 2023
1 parent f1ffef8 commit f036f05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/codec/deflate/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl DeflateReadState {
error: ProtocolError::CompressedControlFrame,
});
}
if !is_data_frame {
if !is_data_frame || !compressed {
return Ok((header, data));
}
let frame = match self.de.as_mut() {
Expand Down
2 changes: 1 addition & 1 deletion src/codec/deflate/non_blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl DeflateReadState {
error: ProtocolError::CompressedControlFrame,
});
}
if !is_data_frame {
if !is_data_frame || !compressed {
return Ok((header, data.to_vec()));
}
let frame = match self.de.as_mut() {
Expand Down

0 comments on commit f036f05

Please sign in to comment.