mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
Fix server websockets big payloads support
This commit is contained in:
@ -454,13 +454,13 @@ impl Stream for ClientReader {
|
||||
// read
|
||||
match Frame::parse(&mut inner.rx, false, max_size) {
|
||||
Ok(Async::Ready(Some(frame))) => {
|
||||
let (finished, opcode, payload) = frame.unpack();
|
||||
let (_finished, opcode, payload) = frame.unpack();
|
||||
|
||||
match opcode {
|
||||
// continuation is not supported
|
||||
OpCode::Continue => {
|
||||
inner.closed = true;
|
||||
return Err(ProtocolError::NoContinuation)
|
||||
Err(ProtocolError::NoContinuation)
|
||||
},
|
||||
OpCode::Bad => {
|
||||
inner.closed = true;
|
||||
|
@ -329,7 +329,8 @@ impl<S> Stream for WsStream<S> where S: Stream<Item=Bytes, Error=PayloadError> {
|
||||
match String::from_utf8(tmp) {
|
||||
Ok(s) =>
|
||||
Ok(Async::Ready(Some(Message::Text(s)))),
|
||||
Err(_) => {
|
||||
Err(e) => {
|
||||
println!("ENC: {:?}", e);
|
||||
self.closed = true;
|
||||
Err(ProtocolError::BadEncoding)
|
||||
}
|
||||
|
Reference in New Issue
Block a user