diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 140d78e9..43f189af 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -7,6 +7,8 @@ * Implement `std::error::Error` for our custom errors [#1422] * Remove `failure` support for `ResponseError` since that crate will be deprecated in the near future. +* Fix a mistake in the encoding of websocket continuation messages wherein + Item::FirstText and Item::FirstBinary are each encoded as the other. [#1422]: https://github.com/actix/actix-web/pull/1422 diff --git a/actix-http/src/ws/codec.rs b/actix-http/src/ws/codec.rs index a37208a2..733976a7 100644 --- a/actix-http/src/ws/codec.rs +++ b/actix-http/src/ws/codec.rs @@ -137,7 +137,7 @@ impl Encoder for Codec { Parser::write_message( dst, &data[..], - OpCode::Binary, + OpCode::Text, false, !self.flags.contains(Flags::SERVER), ) @@ -151,7 +151,7 @@ impl Encoder for Codec { Parser::write_message( dst, &data[..], - OpCode::Text, + OpCode::Binary, false, !self.flags.contains(Flags::SERVER), )