diff --git a/Cargo.toml b/Cargo.toml index 3d0d92a..763475b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/tungstenite/0.17.1" repository = "https://github.com/snapview/tungstenite-rs" version = "0.17.1" edition = "2018" -rust-version = "1.58" +rust-version = "1.56" include = ["benches/**/*", "src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] [package.metadata.docs.rs] diff --git a/src/handshake/client.rs b/src/handshake/client.rs index b1f2c0d..add5808 100644 --- a/src/handshake/client.rs +++ b/src/handshake/client.rs @@ -135,7 +135,7 @@ fn generate_request(mut request: Request) -> Result<(Vec, String)> { HeaderName::from_bytes(header.as_bytes()).unwrap(), )) })?; - write!(req, "{header}: {value}\r\n", value = value.to_str()?).unwrap(); + write!(req, "{header}: {value}\r\n", header = header, value = value.to_str()?).unwrap(); } // Now we must ensure that the headers that we've written once are not anymore present in the map. @@ -300,7 +300,9 @@ mod tests { Upgrade: websocket\r\n\ Sec-WebSocket-Version: 13\r\n\ Sec-WebSocket-Key: {key}\r\n\ - \r\n" + \r\n", + host = host, + key = key ) .into_bytes() }