diff --git a/src/ws/connect.rs b/src/ws/connect.rs index ed664f2e..4cb7d033 100644 --- a/src/ws/connect.rs +++ b/src/ws/connect.rs @@ -43,8 +43,6 @@ pub struct TcpConnector { impl TcpConnector { pub fn new>(addr: S, port: u16, timeout: Duration) -> TcpConnector { - println!("TES: {:?} {:?}", addr.as_ref(), port); - // try to parse as a regular SocketAddr first if let Ok(addr) = addr.as_ref().parse() { let mut ips = VecDeque::new(); diff --git a/src/ws/writer.rs b/src/ws/writer.rs index d31f82c5..57802b34 100644 --- a/src/ws/writer.rs +++ b/src/ws/writer.rs @@ -87,8 +87,9 @@ impl Writer { // status line // helpers::write_status_line(version, msg.status().as_u16(), &mut buffer); // buffer.extend_from_slice(msg.reason().as_bytes()); - buffer.extend_from_slice(b"GET /ws/ HTTP/1.1"); - buffer.extend_from_slice(b"\r\n"); + buffer.extend_from_slice(b"GET "); + buffer.extend_from_slice(msg.url.path().as_ref()); + buffer.extend_from_slice(b" HTTP/1.1\r\n"); // write headers for (key, value) in &msg.headers {