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) {