Skip to content

Commit cabe26c

Browse files
committed
Auto merge of #15257 - sebastiansturm:master, r=lnicola
[lsp-server] Ignore 'Content-Length' case this is a trivial PR meant to address issue #15197: the 'Content-Length' header field should probably be treated as case-insensitive
2 parents 949ecea + 872cd30 commit cabe26c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/lsp-server/src/msg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fn read_msg_text(inp: &mut dyn BufRead) -> io::Result<Option<String>> {
265265
let header_name = parts.next().unwrap();
266266
let header_value =
267267
parts.next().ok_or_else(|| invalid_data!("malformed header: {:?}", buf))?;
268-
if header_name == "Content-Length" {
268+
if header_name.eq_ignore_ascii_case("Content-Length") {
269269
size = Some(header_value.parse::<usize>().map_err(invalid_data)?);
270270
}
271271
}

0 commit comments

Comments
 (0)