We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
is_compressed
1 parent 147593f commit fdb82edCopy full SHA for fdb82ed
1 file changed
src/protocol/mod.rs
@@ -505,17 +505,14 @@ impl WebSocketContext {
505
// the negotiated extensions defines the meaning of such a nonzero
506
// value, the receiving endpoint MUST _Fail the WebSocket
507
// Connection_.
508
- let mut is_compressed = false;
509
- {
+ let is_compressed = {
510
let hdr = frame.header();
511
if (hdr.rsv1 && self.pmce.is_none()) || hdr.rsv2 || hdr.rsv3 {
512
return Err(Error::Protocol(ProtocolError::NonZeroReservedBits));
513
}
514
515
- if hdr.rsv1 && self.pmce.is_some() {
516
- is_compressed = true;
517
- }
518
+ hdr.rsv1
+ };
519
520
match self.role {
521
Role::Server => {
0 commit comments