From 0bfc217cfcf10f0d675cc220431d5c674778ee82 Mon Sep 17 00:00:00 2001 From: macpp Date: Sat, 1 Feb 2020 22:52:41 +0100 Subject: [PATCH] allow firefox to connect --- src/handshake/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handshake/server.rs b/src/handshake/server.rs index fb75192..4cf47d1 100644 --- a/src/handshake/server.rs +++ b/src/handshake/server.rs @@ -39,7 +39,7 @@ pub fn create_response(request: &Request) -> Result { .headers() .get("Connection") .and_then(|h| h.to_str().ok()) - .map(|h| h.eq_ignore_ascii_case("Upgrade")) + .map(|h| h.split(|c| c == ' ' || c == ',').any(|p| p.eq_ignore_ascii_case("Upgrade"))) .unwrap_or(false) { return Err(Error::Protocol(