From cbb23c6c4d257b20af3f6a0877396df89a9343db Mon Sep 17 00:00:00 2001 From: Maccesch Date: Sat, 16 Sep 2023 15:15:24 +0100 Subject: [PATCH] added relative urls to use_websocket --- src/use_websocket.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/use_websocket.rs b/src/use_websocket.rs index bf7cd99..98ffcf4 100644 --- a/src/use_websocket.rs +++ b/src/use_websocket.rs @@ -439,8 +439,6 @@ fn normalize_url(url: &str) -> String { } else { if url.starts_with("ws://") || url.starts_with("wss://") { url.to_string() - } else if url.starts_with("http://") || url.starts_with("https://") { - url.replacen("http", "ws", 1) } else if url.starts_with("//") { format!("{}{}", detect_protocol(), url) } else if url.starts_with('/') {