1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

ws verifyciation takes RequestHead; add SendError utility service

This commit is contained in:
Nikolay Kim
2019-04-11 14:00:32 -07:00
parent 6420a2fe1f
commit d115b3b3ed
10 changed files with 204 additions and 119 deletions

View File

@ -9,7 +9,7 @@ use futures::{Future, Sink, Stream};
fn ws_service<T: AsyncRead + AsyncWrite>(
(req, framed): (Request, Framed<T, h1::Codec>),
) -> impl Future<Item = (), Error = Error> {
let res = ws::handshake(&req).unwrap().message_body(());
let res = ws::handshake(req.head()).unwrap().message_body(());
framed
.send((res, body::BodySize::None).into())