From 80d0547fab5e4e510c73fb0c30f53d731864c37b Mon Sep 17 00:00:00 2001 From: n3oney Date: Sat, 18 Jun 2022 23:31:42 +0200 Subject: [PATCH] fix: uppercase origin header --- src/handshake/client.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/handshake/client.rs b/src/handshake/client.rs index 8ddac5b..0700fa2 100644 --- a/src/handshake/client.rs +++ b/src/handshake/client.rs @@ -158,6 +158,10 @@ fn generate_request(mut request: Request) -> Result<(Vec, String)> { name = "Sec-WebSocket-Protocol"; } + if name == "origin" { + name = "Origin"; + } + writeln!(req, "{}: {}\r", name, v.to_str()?).unwrap(); }