From 872cd30325622dfafdddb64a6480add3999eb515 Mon Sep 17 00:00:00 2001 From: Sebastian Sturm Date: Mon, 10 Jul 2023 22:36:52 +0200 Subject: [PATCH] [lsp-server] Ignore 'Content-Length' case --- lib/lsp-server/src/msg.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)?); } }