mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
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
This commit is contained in:
commit
cabe26c228
1 changed files with 1 additions and 1 deletions
|
@ -265,7 +265,7 @@ fn read_msg_text(inp: &mut dyn BufRead) -> io::Result<Option<String>> {
|
|||
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::<usize>().map_err(invalid_data)?);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue