Skip to content

Commit

Permalink
fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
4t145 committed Oct 27, 2023
1 parent dcca737 commit 1af40ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/connection/tokio_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ impl TokioConnection {
.expect("should have headers");
let req = http_req_builder
.uri(reqwest_req.url().as_str())
.method("GET")
.header("Host", reqwest_req.url().host_str().unwrap_or_default())
.header("Connection", "Upgrade")
.header("Upgrade", "websocket")
.header("Sec-WebSocket-Version", "13")
.header("Sec-WebSocket-Key", ws2::handshake::client::generate_key())
.body(())
.expect("shouldn't fail to build ssh req body");
let (mut ws_stream, _resp) = tokio_ws2::connect_async(req).await?;
Expand Down

0 comments on commit 1af40ce

Please sign in to comment.