From ae854b395fc7ba95efb9727ab4a9d46ff1d8ddfc Mon Sep 17 00:00:00 2001 From: chesedo Date: Wed, 4 May 2022 14:22:42 +0200 Subject: [PATCH] bug: handle space in connection header correctly --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 02e9056..241c129 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -192,7 +192,7 @@ fn get_upgrade_type(headers: &HeaderMap) -> Option { .to_str() .unwrap() .split(',') - .any(|e| e.to_lowercase() == "upgrade") + .any(|e| e.trim().to_lowercase() == "upgrade") }) .unwrap_or(false) {