diff --git a/lib/lsp-server/src/msg.rs b/lib/lsp-server/src/msg.rs index b241561f9c..730ad51f42 100644 --- a/lib/lsp-server/src/msg.rs +++ b/lib/lsp-server/src/msg.rs @@ -265,7 +265,7 @@ fn read_msg_text(inp: &mut dyn BufRead) -> io::Result> { let header_name = parts.next().unwrap(); let header_value = parts.next().ok_or_else(|| invalid_data!("malformed header: {:?}", buf))?; - if header_name == "Content-Length" { + if header_name.eq_ignore_ascii_case("Content-Length") { size = Some(header_value.parse::().map_err(invalid_data)?); } }