1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00

properly handle upgrade header if content-length header is set

This commit is contained in:
Nikolay Kim 2018-11-08 20:38:40 -08:00
parent 6a1d560f22
commit dea39030bc

View File

@ -141,6 +141,13 @@ impl Decoder for RequestDecoder {
}
header::UPGRADE => {
has_upgrade = true;
// check content-length, some clients (dart)
// sends "content-length: 0" with websocket upgrade
if let Ok(val) = value.to_str() {
if val == "websocket" {
content_length = None;
}
}
}
_ => (),
}