1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

fix ws upgrade

This commit is contained in:
Nikolay Kim 2019-03-18 05:30:18 -07:00
parent efe3025395
commit 8872f3b590

View File

@ -93,8 +93,7 @@ pub fn handshake(req: &HttpRequest) -> Result<HttpResponseBuilder, HandshakeErro
}; };
Ok(HttpResponse::build(StatusCode::SWITCHING_PROTOCOLS) Ok(HttpResponse::build(StatusCode::SWITCHING_PROTOCOLS)
.header(header::CONNECTION, "upgrade") .upgrade("websocket")
.header(header::UPGRADE, "websocket")
.header(header::TRANSFER_ENCODING, "chunked") .header(header::TRANSFER_ENCODING, "chunked")
.header(header::SEC_WEBSOCKET_ACCEPT, key.as_str()) .header(header::SEC_WEBSOCKET_ACCEPT, key.as_str())
.take()) .take())