bug: handle space in connection header correctly

This commit is contained in:
chesedo 2022-05-04 14:22:42 +02:00 committed by Felipe Noronha
parent 605dba0521
commit ae854b395f

View File

@ -192,7 +192,7 @@ fn get_upgrade_type(headers: &HeaderMap) -> Option<String> {
.to_str() .to_str()
.unwrap() .unwrap()
.split(',') .split(',')
.any(|e| e.to_lowercase() == "upgrade") .any(|e| e.trim().to_lowercase() == "upgrade")
}) })
.unwrap_or(false) .unwrap_or(false)
{ {