1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 02:19:22 +02:00

actix 0.5.5, ws test

This commit is contained in:
Nikolay Kim
2018-03-19 13:12:36 -07:00
parent e7ec0f9fd7
commit 35ee5d36d8
5 changed files with 61 additions and 11 deletions

View File

@ -557,8 +557,7 @@ impl<S: 'static, H> ProcessResponse<S, H> {
Ok(result) => res = Some(result),
}
},
Frame::Drain(fut) =>
self.drain = Some(fut),
Frame::Drain(fut) => self.drain = Some(fut),
}
}
self.iostate = IOState::Actor(ctx);

View File

@ -241,7 +241,7 @@ impl<T: AsyncWrite, H: 'static> Writer for H1Writer<T, H> {
self.encoder.write(payload)?;
}
} else {
// might be response to EXCEPT
// could be response to EXCEPT header
self.buffer.extend_from_slice(payload.as_ref())
}
}

View File

@ -456,14 +456,12 @@ impl Stream for ClientReader {
Ok(Async::Ready(Some(frame))) => {
let (finished, opcode, payload) = frame.unpack();
// continuation is not supported
if !finished {
inner.closed = true;
return Err(ProtocolError::NoContinuation)
}
match opcode {
OpCode::Continue => unimplemented!(),
// continuation is not supported
OpCode::Continue => {
inner.closed = true;
return Err(ProtocolError::NoContinuation)
},
OpCode::Bad => {
inner.closed = true;
Err(ProtocolError::BadOpCode)